Back to top

Affiliate Link: Interested In a Useful Tables For Amazon Products and More? Check Out:

Amalinks Pro

Removing “NoFollow” Links From Homepage Buttons

Featured Tiles
As an Amazon Associate we earn from qualifying purchases made on our website. If you make a purchase through links from this website, we may get a small share of the sale from Amazon and other similar affiliate programs. You can read our complete legal information for more details.

The images and buttons on the homepage of the Acabado theme are “nofollow” links which mean they don’t provide any of the link juice from your homepage to the posts referenced and linked on the homepage. This is traditionally something you would only do to links leaving your site, so I went about removing the “nofollow” attribute and wanted to give you the choice to make the change.

PLEASE NOTE ALL THEME CHANGES WILL BE REMOVED WHEN YOU UPDATE A THEME TO THE NEXT VERSION

Edit Theme File For Image Links:

  1. Open Appearance
  2. Theme Editor
  3. From Right Menu Open ‘template-parts’
  4. Select ‘content-post.php’
  5. Find line 26 and change the following code:
  <a href="<?=get_permalink( get_the_id() )?>" rel="nofollow"><div class="image-container" style="background-image: url('<?=$thumbnail_url?>')"></div><span class="sr-only">link to <?=get_the_title( get_the_id() )?></span></a>

Change it to read

  <a href="<?=get_permalink( get_the_id() )?>"><div class="image-container" style="background-image: url('<?=$thumbnail_url?>')"></div><span class="sr-only">link to <?=get_the_title( get_the_id() )?></span></a>

Now the images are linked with “dofollow” links to your articles.

Next To Modify the Button Links

  1. Open Appearance
  2. Theme Editor
  3. From Right Menu Open ‘functions.php’
  4. Find line 630 and change the following code:
		 $excerpt = sprintf( '<p>%s...</p><p><a class="button reverse" rel="nofollow" itemprop="mainEntityOfPage" href="%s">%s</a></p>', $excerpt, get_permalink( get_the_id() ), $button_text );

to

		 $excerpt = sprintf( '<p>%s...</p><p><a class="button reverse" itemprop="mainEntityOfPage" href="%s">%s</a></p>', $excerpt, get_permalink( get_the_id() ), $button_text );

Note the removal of the rel=”nofollow” which now makes anything linking to your homepage pass that “link juice” to the articles on the homepage. This isn’t necessarily needed but it is valuable to some people who, like I, don’t want to nofollow my own internal links.

About Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals! Read More About Me...

My Posts | Website

Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals! Read More About Me...

2 thoughts on “Removing “NoFollow” Links From Homepage Buttons

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Content