Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1166592

    Hi Enfold button, please, could you remember me the right place to modify helper social media.php to set noindex of social button?
    Thanks in advance

    #1166720

    Hey nuncer,

    I’m not sure I understand you question, do you mean that you want to set the links to nofollow maybe?

    Best regards,
    Rikard

    #1166791

    Hi Rikard, excuse me for mistake, I means nofollow…

    #1166983

    Hi,

    Yes, open up wp-content/themes/enfold/includes/helper-social-media.php and replace:

    $this->html .= 		"<a {$blank} href='".$share['url']."' ".av_icon_string($icon)." title='' data-avia-related-tooltip='{$name}'><span class='avia_hidden_link_text'>{$name}</span></a>";

    with this:

    $this->html .= 		"<a {$blank} rel='nofollow' href='".$share['url']."' ".av_icon_string($icon)." title='' data-avia-related-tooltip='{$name}'><span class='avia_hidden_link_text'>{$name}</span></a>";

    Best regards,
    Jordan Shannon

    #1167027

    Hi Jordan, thanks for your answer. My question is about social icon on the home page and “Share this post” icons. I created a folder named “Includes” in enfold-child; I copied file “helper-social-media.php” in and inserted rel nofollow (it’s quite different from your description):
    “;
    $this->html .= “<span class=’avia_hidden_link_text’>{$name}</span>”; $this->html .= ‘
    ‘;

    Modified in:
    “; $this->html .= “<span class=’avia_hidden_link_text’>{$name}</span>”; $this->html .= ‘‘;

    but doesn’t work, I see now “noopener noreferrer” on the social icon on the home with inspector and nothing on the “share this post” icons. Is possible to have “noopener nofollow”?
    Thanks again.

    #1168112

    Any advice?
    Thank you.

    #1168344

    Hi,
    Sorry for the late reply, to add rel='nofollow' to the social icons at the top of your page you will need to edit line 167 of \enfold\includes\helper-social-media.php
    look for:

    $html .=	"<a {$blank} {$aria_label} href='" . esc_url( $icon['social_icon_link'] ) . "' " . av_icon_string( $icon['social_icon'] ) . " title='{$display_name}'>";

    change to:

    $html .=	"<a {$blank} rel='nofollow' {$aria_label} href='" . esc_url( $icon['social_icon_link'] ) . "' " . av_icon_string( $icon['social_icon'] ) . " title='{$display_name}'>";

    To add the rel='nofollow' to the “Share this entry” at the bottom of your post edit line 436, look for:

    $this->html .=			"<a {$blank} {$aria_label} href='" . esc_url( $share['url'] ) . "' " . av_icon_string( $icon ) . " title='' data-avia-related-tooltip='{$name}'>";

    change to:

    $this->html .=			"<a {$blank} rel='nofollow' {$aria_label} href='" . esc_url( $share['url'] ) . "' " . av_icon_string( $icon ) . " title='' data-avia-related-tooltip='{$name}'>";

    But you can’t override a helper function inside a child theme. The override will only work for template files such as the header.php, loops, templates etc. So please make these changes to the parent theme.
    Please save a copy of your original file as a fallback.

    Best regards,
    Mike

    #1168510

    Hi Mike, it works. Great!
    Thank you very much.
    Best regards.

    #1168519

    Hi nuncer,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.