How to nofollow links in default related posts widget of WordPress

Find the file default-widgets.php in wp-includes folder of WordPress Installation. Keep a backup of the original file incase you make mistake. Find the following lines of code under Recent_Posts widget class

  • Change it to these. We have added the rel=”nofollow” attribute for the link elements of related post links

  • Refresh the WordPress posts or pages where you have configured the default related posts widget. The links of the Widget have become nofollowed.

    5 thoughts on “How to nofollow links in default related posts widget of WordPress

    1. flappy bird

      You have some dedicated information throughout this text. I even have
      extraordinarily enjoyed your views on this subject. you are a precocious
      author. Thank you.

    Leave a Reply

    Your email address will not be published.