-
AuthorPosts
-
November 25, 2013 at 8:14 pm #193127
Hi guys , I folllowed this thread >
https://kriesi.at/support/topic/icon-box-icon-link/
and replaced the php file with the custom one and I’m having this error >
The icons are clickable but it shows this text >>
aria-hidden=’true’ data-av_icon=’’ data-av_iconfont=’entypo-fontello’I also followed another thread about putting a folder in your child theme ,can’t remember though.
Or in short , I want to know what works to make the top icon box clickable.
Thanks
November 25, 2013 at 11:40 pm #193199I’m having the same issue and wanted to add myself should a reply come
November 26, 2013 at 12:05 am #193202Have a look to this thread, maybe it’s kinda useful:
https://kriesi.at/support/topic/solution-making-the-iconbox-element-fully-linked/PS: You may also achieve this with a few lines of jQuery, but this is a bit more complicated (as you have to read the link of the item beforehand).
- This reply was modified 10 years, 12 months ago by formateins.
November 26, 2013 at 7:34 am #193282Hi formateins ,
Dude said the code is not w3c valid ? Still safe to use ?
November 26, 2013 at 2:47 pm #193431I’ve never had any probs with that. And yeah, wrapping block elements should be best avoided. Just give it a shot and see if it works for you.
November 27, 2013 at 7:14 am #193735Okay I’m going to give it a try
November 27, 2013 at 7:15 am #193736formateins , how do you do this if you have a child theme ?
November 27, 2013 at 8:35 am #193746There are serveral ways to achieve this depending on your php skills.
Easy, but not that good idea is to copy all related files to the child so your modified iconbox.php will be loaded. You need to traverse this back to the file, where the shortcode is executed. In case of Enfold (individual framework) I wouldn’t recommend that.
Easiest way is simply modifying the original files and track the changes (file, linenumber, etc.). So it’s quite fast to readd the changes in a new version of the theme.
If you’re familiar with oop, you can write your own code straight into functions.php. In this specific case you should extend the avia_sc_icon_box class overwriting/redefining the shortcode_handler function. Be aware of the ShortcodeHelper reference (removing the wpautop).
And finally, if you’re familiar with jQuery, go this way. :) Create your own custom.js, append it to the footer, read out the href of each iconbox element and wrap whatever you like to have a link on.
November 29, 2013 at 1:42 pm #194724Hey!
If you want to overwrite an existing shortcode create a “shortcodes” folder within the child theme directory, then copy the /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/iconbox.php into the child theme “shortcodes” folder and modify the php code. Then add following code into the child theme functions.php file
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; }
This code will make sure the the shortcode file of the child theme is loaded first and you can overwrite the parent theme shortcode files with the child theme.
Cheers!
PeterDecember 2, 2013 at 1:44 pm #195269Can you post the entire iconbox.php file ? I’m still getting the error.
December 3, 2013 at 12:33 pm #195733Hey!
I don’t have the modified iconbox.php and I also do not support the code modification. I’ll leave this thread open – maybe formateins can provide his modified file.
Best regards,
PeterDecember 4, 2013 at 8:05 am #195983Hi dude, was talking to formateins , hehe =)
December 5, 2013 at 11:19 am #196595Hi!
Hehe ok :)
Best regards,
Peter -
AuthorPosts
- The topic ‘Make Top Icon Linkable’ is closed to new replies.