Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #950844

    Hey Guys,
    One, I’ve asked u how to get a full column clickable was :
    Add this code in functions.php child theme

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    And create a shorcodes folder under the child theme with a columns.php file with this code inside : https://gist.github.com/josueochoa/1ca3fccab73abc9974518bbbee401996

    The functions.php code breaks my site (eror 500) Could you help?
    Tx guys

    #950899

    Hey,

    Even if I have removed the functions.php code, it seems to work. Could you confirm that columns.php file is the only one required now?
    Tx guys !
    Marine

    #951546

    Hi Marine,

    The folder is now called avia_shortcodes and there could be some code that causes the issue now.

    Can you please check server log for error?

    Best regards,
    Victoria

    #951576

    by the way did you see this on the page of Josue: “Created 2 years ago”

    #951581

    Hi,

    Ever since Enfold 4.3, you can apply links to columns and cells without needing extra customization :)

    Regards,
    Yigit

    #951632

    ;-) I use Enfold for a long time and not often this feature so I’ve written the code somewhere. Glad it’s included now :-)

    #951688

    And if it is not an alb with that feature the code here will work too:
    What does the code : you give a custom class to the container (mostly a parent container) : clickable – it finds the first link in that container and tranfer the link option to it. And if there is no link in it – it will not have the option.
    you only have to give to the clickme class a hover style – like cursor or anything else – see here: https://webers-testseite.de/3-4th-centered/

    function transfer_link_from_child(){
    ?>
    <script>
    (function($){
    	$(".clickable").each(function(){ 
    	    var theLink = $(this).find("a:first").attr("href");
    	    if (typeof theLink !== "undefined"){
    			$(this).addClass("clickme");
    			$(this).on("click", function(){
    				window.location.href = theLink;
    			});
    		};
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'transfer_link_from_child');

    One advantage of the code: if you have accidentaly given the class clickable to an element – or you eliminated the links in an element with that class – the element does not get those attributes.
    You see althought the 1/2 column on the left bottom with the code element got the clickable class – id does not get the settings.

    • This reply was modified 6 years, 6 months ago by Guenni007.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.