SEO: WordPress Shortcode for Sitewide Links


It is accepted that backlinks are the most important ranking factor in Search Engine Optimization. And one of the easiest way to generate a substantial amount of links is by placing footer links that appears throughout a website.

What are Sitewide Links?

Sitewide links are usually outbound links that appear in the footer or sidebar of a website. These links are said to have largely no impact or negative to SEO. Since the google Penguin 2.0 update, which targets unnatural link building, many websites are hit by a penalty.

But from our observation of some websites, footer links do contribute positively to rankings. Which is contrary to many experts’ opinion. According to SEO Expert Rob Powell, external sitewide footer links no longer as dangerous as before as Google as these links will not be penalized but simply won’t be given any weight. And, links such as a credit to a Web Designer or a partner’s website would not be penalized.


The commonly accepted safe way for any external links is to add a rel=”nofollow” attribute to footer external links. This attribute essentially tells Googlebot not to crawl and index said link.

However, in September 2019, Google announced that the nofollow attribute would effectively be “promoted” as a “hint” for Google’s algorithm. And furthermore, after March 1, 2020, they will also be used for crawling and indexing but Google may choose to ignore the directive and use nofollow links for rankings.

In our reading, we read an idea that one could place a valuable dofollow link in the front page of a website and nofollow links on other pages. In theory, it sounds like a rather good idea, but it is not proven and may have a negative effect on your website. Accordingly, we devised a simple WordPress Shortcode to achieve this.

Sitewide Links WordPress Shortcode

This WordPress Shortcode can be used in a text widget that you place within your Footer. It generates an external dofollow link with desired anchor text on the homepage and a nofollow links on the rest of your pages.

/* Declare function */ 
function footer_credit( $atts ){ 
/* Output if page is home page */ 
return "<a href='' target='_blank'>Your Text</a>"; }
/* Output if other pages */ 
return "<a href='' rel='nofollow noopener' target='_blank'>Your Text</a>"; 
/* Add the Shortcode */ 
add_shortcode( 'footer_credit', 'footer_credit' );

You’ll have customize the code to suit your desired output, of course.

  1. Copy and paste the above code into your functions.php file
  2. Replace “ with your website address
  3. Replace “Your Text” with your own text
  4. Insert [footer_credit] into a text widget in your footer to execute the Shortcode

Other Options

In addition to nofollw, Google has also recommended the “sponsored” attribute to indicate a Paid/Sponsored link and the “ugc” attribute for user generated links.


Sidewide links may or may not improve your SEO. But as some might say, having links are better than no links at all. We hope that by using this WordPress Shortcode, you can have more control of sitewide footer links.

Some other articles on SEO you may also like:
SEO Transition Words
SEO Tools
WordPress Shortcode

Notify of

Inline Feedbacks
View all comments