Affiliate Marketing & Programs

Learn How To Create A WordPress Links Template


There are lots of ways of displaying affiliate links on a WordPress blog. Some affiliates choose to use side-wide sidebars, others include links in the body of their content, some prefer to have a resource-like page containing all the links so the user can find everything in one place.

Each of these approaches is a valid one, and it can surely work depending on the kind of audience your site attracts. Today, however, we’re going to talk about a slightly different approach. One that’s kind of a combination of all three of the aforementioned tactics.

In this post we’re talking about how to create a WordPress links template.

What’s a Links Template?

In a sentence: It’s a custom page template that lets you display all your links automatically, without you having to input them manually on every page.

Some things you can use a links template for:

  • To display a set of affiliate links on every page of your WordPress blog.

  • To create custom pages that focus user’s attention on your affiliate links.

  • To display an affiliate disclosure along with your set of affiliate links (the whole FTC thing).

From a user’s perspective, your site looks normal. A visitor can’t tell whether you’re using a links template or not. All they can see is just an additional box of links that comes after the main block of content.

Pros of Using a Links Template

There’s a handful of significant benefits, but we are sure you’ll be able to come up with even more once you start using such a template.

1. Additional Focus on Your Affiliate Links

Every affiliate knows that the more places where you display your links, the more chance you have of somebody clicking them (and hopefully buying something).

Even though you can’t be too aggressive because once you cross a certain line your site starts to look spammy instead of helpful, having an additional block of links after your main content is always effective.

2. Content Links Are Always Better Than Sidebar Links

People just focus more attention on what’s in the main content block than on what’s in the sidebar.

At least that’s the case for WordPress blogs. Over the years people have developed certain patterns of behavior when it comes to anything that looks like a blog.

Whenever there’s a main content block and a sidebar on the right, there’s an immediate impression that we’re dealing with a blog. And blogs don’t usually show anything important in sidebars. People know this, and they subconsciously overlook the sidebars for the most part. That’s why displaying important information in the main content block works better.

3. You Can Make Site-wide Changes

Site-wide changes are when you can change a big portion of your whole blog with just a simple action. Like for example, including a new affiliate link on every page of your blog, or deleting an old one.

If you were not using a links template you’d have to go to each page manually and make these changes by hand. As you can imagine, this is a seriously ineffective approach.

4. Easy Inclusion And Modification of Any Affiliate Disclosures

This became important a couple of years ago when FTC decided to smite affiliates with new rules and regulations. Now everyone doing business in the US has to disclose their affiliations.

Of course, you can include such a disclosure manually, but what if the rules change and you’ll have to update it on tens of pages all of a sudden… If you’re using a links template you can do it all in one place.

Need hosting for your new website? Sign up for HostGator here.

How to Create a Links Template

There are some things you’ll need before you can do this:

  1. Access to the admin panel of your WordPress blog, obviously.

  2. FTP access to your hosting account.

  3. Really basic HTML knowledge (and we do mean REALLY basic).

Now the actual steps to create your own links template:

1. Get Your page.php File

Start by downloading the page.php file of the theme you’re currently using. Do this via FTP.

2. Make a Copy

Make a copy of your page.php file and call it links-template.php.

3. Insert Code

Open your new file in notepad or similar software.

Start by including this:

/* Template Name: Links Template */

right after the first “<?php” tag.

Next, find a line that looks something like this:

<?php endwhile; // end of the loop. ?>

The most important element is the “endwhile;”

Create a new line right after this one and insert this code:

$style_basic = '-moz-border-radius: 6px 6px 6px 6px; -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); font-size: 13px; line-height: 24px; font-weight: normal; font-family: Arial; margin-bottom: 30px; padding: 15px 15px 15px 15px; position: relative; ';
$style_blue = $style_basic.'background: #EAF8FE; border: 1px solid #4381CC; color: #285898; ';
<div style="<?= $style_blue ?>">
<?php wp_list_bookmarks('title_li=&category_before=&category_after=&title_before=<h4>&title_after=</h4>'); ?>

You can use this opportunity to include your affiliate disclosure in the place marked above.

Finally, save the file and upload it to your theme’s directory via FTP.

How to Use This Links Page Template

If everything works well you should be able to use your new template whenever you’re editing an existing page or creating a new one.

But first, you need to input all your affiliate links into the Links section of your WordPress admin panel.


When you’re done with that, you can go to the Pages section and pick an example page to edit (or click “Add New”).

There’s a block called “Page Attributes” in the right sidebar when editing any page of your blog. Click the drop-down list labeled “Template” and your new template – “Links Template” should be waiting there. Select it.

template sidebar

Now just click the main Publish or Update button and the work is done.

Here’s what your links block looks like (this one has been added following the same instruction as given above; the theme for this example is Twenty Eleven – the default theme for WordPress):

links block

Looks nice, doesn’t it?

An Easier Way of Working With Your Theme

The modification described above can be a little scary, we admit. It does require some basic HTML knowledge and FTP software skills.

If you don’t want to do all this on your own you can try getting an advanced theme from one of the popular theme stores like: BizzThemes, Gorilla Themes, or StudioPress. These companies are all about providing cool themes with lots of features. We’re not trying to sell you on these themes, we’re just telling it like it is.

Learn more about for StudioPress themes here!

One final question we want to ask you. What tactics are you using for displaying affiliate links? Do you have any system set up, or are you inserting your links by hand every time?

VN:F [1.9.18_1163]
Was this article helpful to you?

Tags: , ,

4 Responses to Learn How To Create A WordPress Links Template

  1. Clay Montgomery April 10, 2012 at 1:33 pm

    Is this the process you used to create an outbound links page? I noticed all your affiliate links look like “”. I assume there is an SEO advantage to doing it this way?

  2. android market April 12, 2012 at 3:04 am

    Wow, amazing blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your website is wonderful, let alone the content!. Thanks For Your article about WordPress Links Template How To Create .

  3. Jane Fadley July 17, 2012 at 11:27 pm

    Thanks a whole lot for nice specifics, amazing evaluation, Let me revisit your internet web site the really next time.

Leave a Reply

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


Notify me of followup comments via e-mail

Sign me up for Daily Updates from!
Get the Hottest Tips & Updates

Subscribe to our Affiliate Secret Tips Newsletter and get Exclusive weekly Updates

We will not share this info with any third party.

People Love Us!

Product Reviews

More in Site Building & Design (107 of 140 articles)

EXPOSED: The Big 3, Highest-Grossing Affiliate
Niches and How To Get Started Earning

Download this Free Guide to Find-Out

  • Tips to Stand-Out Against Your Competition
  • Get the Inside on the Best Programs to Partner With
  • Uncover the Keys to Exploding Your Commissions

We hate spam as much as you do. Please review our Privacy Policy Here.