How To Add an Affiliate Disclosure to Your WordPress Posts

by

Hey there! Some links on this page may be affiliate links which means that, if you choose to make a purchase, I may earn a small commission at no extra cost to you. I greatly appreciate your support!

In this quick tutorial, you’ll learn how to add an affiliate disclosure statement to your blog posts. By using the Ad Inserter plugin, we can automatically include your disclaimer at the top of your posts with affiliate links.

Using a plugin to include your affiliate statement allows you to easily toggle the disclosure without directly modifying the content of your blog posts.

Install the Ad Inserter Plugin

You’ll need to install the Ad Inserter plugin by Igor Funa. You can also find the plugin from your WordPress dashboard by going to Plugins > Add New > and search for “ad inserter”.

If you are using the GeneratePress theme, you don’t need to install a plugin. Instead, you can add a Hook under Appearance >  Elements > Add New Element and paste in the HTML code below.

While this isn’t specifically an affiliate disclosure statement plugin, it does exactly what we need it to do. Additionally, we want to limit the number of WordPress plugins installed so your website continues to runs fast. The Ad Inserter plugin allows you to not only insert affiliate disclosures, but also add an author bio box to your posts.

After installing and activating, find Ad Inserter in your list of plugins and go to the plugin’s settings page.

Affiliate Disclosure Plugin Settings

Within the large text box on the plugin’s settings page, copy and paste the following code. Feel free to modify the HTML to personalize your affiliate disclosure statement as necessary.

<div style="border:1px solid black; padding: 8px; font-size: 14px;">
<b>Hey there!</b><em> Some links on this page are affiliate links which means that, if you choose to make a purchase, I may earn a small commission at no extra cost to you. I greatly appreciate your support!</em>
</div>
<br>

The above code generates an affiliate disclosure statement that looks like this.

Affiliate disclosure statement plugin output

Ad Inserter Plugin Setting

Next, we need to configure a few settings to enable displaying your disclosure statement at the top of your posts. There are six setting we need to change according to the screenshot below:

Affiliate disclosure statement plugin settings

  1. Rename the block of code to Affiliate disclosure
  2. Ensure Posts is selected
  3. Select Use exceptions for individual posts or pages to change insertion
  4. Choose Disabled as the default insertion
  5. Select Before content for the insertion type
  6. Save Settings 1 – 16

Now, you can go to a blog post and see the affiliate disclosure above the first paragraph of your article.

If necessary, you can change where the box shows up by selecting a different insertion location. According to FTC guidelines, the affiliate disclosure should be placed where it easily catches consumers’ attention and is difficult to miss.

You can also change the default insertion to enabled if necessary. Otherwise, in order to show the disclosure, you must manually check the box when editing your blog post to enable the statement.

Enable affiliate disclosure statement check box

For more cool ways to use the Ad Inserter plugin, check out my tutorial on inserting an author bio box to your blog posts.

If you have any questions about adding an affiliate disclosure to your website, let me know in the comments below.


About The Author

With a strong software engineering background, Tony is determined to help as many people as possible start their online busines. Discover why Tony quit his hedge fund job to pursue this mission. You can send Tony a message here.

1 thought on “How To Add an Affiliate Disclosure to Your WordPress Posts”

  1. Thank you so much for the code… That’s save some times… make another tutorials about last updated date on post… thanks

    Reply

Leave a Comment