-
AuthorPosts
-
May 3, 2018 at 3:31 pm #950844
Hey Guys,
One, I’ve asked u how to get a full column clickable was :
Add this code in functions.php child themeadd_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 guysMay 3, 2018 at 4:16 pm #950899Hey,
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 !
MarineMay 4, 2018 at 11:29 am #951546Hi 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,
VictoriaMay 4, 2018 at 12:12 pm #951576by the way did you see this on the page of Josue: “Created 2 years ago”
May 4, 2018 at 12:18 pm #951581Hi,
Ever since Enfold 4.3, you can apply links to columns and cells without needing extra customization :)
Regards,
YigitMay 4, 2018 at 1:22 pm #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 :-)
May 4, 2018 at 2:27 pm #951688And 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, 7 months ago by Guenni007.
-
AuthorPosts
- You must be logged in to reply to this topic.