Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #283281

    Hello,

    I’ve already opened this topic (https://kriesi.at/support/topic/add-relnofollow-on-button-links/) but it’s closed and I can’t add an answear.
    After applying the method of Yigit, I’m not satisfied of the result.

    Indeed, my code looks like that :

    <div class=’avia-button-wrap avia-button-left avia-builder-el-2 el_after_av_one_third el_before_av_hr rel-nofollow’>

    <span class=’avia_button_icon’ aria-hidden=’true’ data-av_icon=’’ data-av_iconfont=’entypo-fontello’></span>
    <span class=’avia_iconbox_title’ >My anchor text</span>

    </div>

    As you can see, there isn’t the rel=”nofollow” on the . The function added doesn’t works.
    Can you help me again ?

    #283282

    Hey JBMKL!

    Can you post the link to your website and point out the buttons? Code i posted should add rel=”nofollow” to A tagged elements with .rel-nofollow class

    Cheers!
    Yigit

    #283320

    You can find an example here : http://www.foot-actu.com/billets-football-europe/places-billets-ligue-1-france/paris-st-germain-fc/psg-bastia-samedi-16-aout-2014/
    The link is the button with the anchor texte Acheter billet PSG Bastia

    The div has the classe “rel-nofollow” but it doesn’t add the attribute ont the < a >

    #283389

    Hey!

    Thank you for the update.

    I checked the page and the button does have a rel=”nofollow” attribute applied to it. This is the button code:

    <div class="avia-button-wrap avia-button-left  avia-builder-el-2  el_after_av_one_third  el_before_av_hr  rel-nofollow">
    	<a href="http://www.viagogo.fr/psg/Billets-de-sport/Football/Ligue-1/Paris-Saint-Germain-Billets/E-667348?AffiliateID=1277&PCID=AFFFRIAFF1277REFART0F4EDEAE1E-10" class="avia-button avia-icon_select-yes avia-color-theme-color avia-size-small avia-position-left" target="_blank" rel="nofollow"><span class="avia_button_icon" aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello"></span><span class="avia_iconbox_title">Acheter billet PSG Bastia</span></a>
    </div>
    

    Regards,
    Ismael

    #283444

    Yes, this is when you use sthg like Webdevelopper to check the code where the code is already interpreted.
    Look at the source, you’ll not see the same thing. And you’ll not see a rel=”nofollow” on the < a >. So does Google.
    The adding of the attribute is conditionned to a javascript that Google won’t see. And as you probably know, rel=”nofollow” is mainly here for Google.

    #283470

    Hey!

    Please go to Enfold/config-templatebuilder/Avia-shortcodes folder and open Buttons.php file and find

    $output .= "<a href='{$link}' class='avia-button ".$this->class_by_arguments('icon_select, color, size, position' , $atts, true)."' {$blank} {$style} >";

    and change it to

    $output .= "<a rel='nofollow' href='{$link}' class='avia-button ".$this->class_by_arguments('icon_select, color, size, position' , $atts, true)."' {$blank} {$style} >";

    Cheers!
    Yigit

    #283577

    Hello,
    It’s ok like this.
    The matter is that I’ll have this attribute on all buttons of my website, isnt’it ?

    On the Buttons.php file, can you explain me what these lines means and what is this rel=”nofollow” mentionned ?
    $blank = strpos($atts[‘link_target’], ‘_blank’) !== false ? ‘ target=”_blank” ‘ : “”;
    $blank .= strpos($atts[‘link_target’], ‘nofollow’) !== false ? ‘ rel=”nofollow” ‘ : “”;

    I’ve tried to put link_target=’nofollow’ in my code and it’s ok (without target blank)

    If you think it’s ok too, can I delete codes I added in my function.php with the js and the custom class ?

    • This reply was modified 10 years, 4 months ago by JBMKL.
    #283591

    Hey!

    It seems ok. If it does what you would like to achieve, you can remove js code and custom class :)

    Best regards,
    Yigit

    #283596

    Ok, thank you for your help

    #283598

    You are welcome, if you have any other questions or issues, let us know!

    Cheers!
    Yigit

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Add rel="nofollow" on button links #2’ is closed to new replies.