Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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

    #193199

    I’m having the same issue and wanted to add myself should a reply come

    #193202

    Have 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 11 years ago by formateins.
    #193282

    Hi formateins ,

    Dude said the code is not w3c valid ? Still safe to use ?

    #193431

    I’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.

    #193735

    Okay I’m going to give it a try

    #193736

    formateins , how do you do this if you have a child theme ?

    #193746

    There 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.

    #194724

    Hey!

    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!
    Peter

    #195269

    Can you post the entire iconbox.php file ? I’m still getting the error.

    #195733

    Hey!

    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,
    Peter

    #195983

    Hi dude, was talking to formateins , hehe =)

    #196595

    Hi!

    Hehe ok :)

    Best regards,
    Peter

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Make Top Icon Linkable’ is closed to new replies.