• Resolved dirkliesenfeld

    (@dirkliesenfeld)


    Hi,
    is it possible to add the nofollow attribute to the links, that are generated by this plugin?
    I am using it to display some posts on my frontpage, but don’t want google to count them into my internal pagerank. Google splits the value of the frontpage for each link, that is used there, except when nofollow is used ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • RaHa

    (@ralphhahnnet)

    You can modify display-posts-shortcode.php lines
    497
    $title = '<a href="' . apply_filters( 'the_permalink', get_permalink() ) . '" rel="nofollow">' . get_the_title() . '</a>';

    507
    $image = '<a href="' . get_permalink() . '" rel="nofollow">' . get_the_post_thumbnail( get_the_ID(), $image_size ) . '</a> ';

    541
    $more = $excerpt_more_link ? ' <a href="' . get_permalink() . '" rel="nofollow">' . $more . '</a>' : ' <span class="excerpt-more">' . $more . '</span>';

    578
    $term_output[] = '<a href="' . get_term_link( $term, $category_display ) . '" rel="nofollow">' . $term->name . '</a>';

    • This reply was modified 5 years, 9 months ago by RaHa.
    Thread Starter dirkliesenfeld

    (@dirkliesenfeld)

    Hmmm, but I would have to redo this after each plugin update, right?
    Could the dev integrate an option into the plugin?

    Plugin Author Bill Erickson

    (@billerickson)

    Thanks for the request.

    I think a better approach is to filter the output in your theme or a core functionality plugin so the functionality remains after updating the plugin.

    Here’s a tutorial I wrote on opening links in a new window. You could use the exact same approach, except change target="_blank" to rel="nofollow".

    Thread Starter dirkliesenfeld

    (@dirkliesenfeld)

    Awesome. i will do exactly that. thank you so much ????

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘nofollow attribute to link?’ is closed to new replies.