How to Add an Easy Affiliate Disclaimer to Your WordPress Site

Do you want to add an easy Affiliate Disclaimer to your WordPress site? We appreciate the flow of your thoughts!

Honesty and transparency are always the best policies one can have for his website or a blog. Being honest with your audience and letting they know the important nuances and points of your activities is the best reflection of business customer relations based on trust and loyalty.

In order to put the things quite understandable for you, let’s start with discussing what actually an affiliate disclaimer is.

What is an easy Affiliate Disclaimer?

easy affiliate disclaimer

Easy Affiliate Disclaimer is a kind of statement on the affiliate relationships your site has with other businesses and websites. It becomes more important whenever you have some income or revenue from this kind of commercial relationships.

For example, you own a WordPress based website and have included affiliate links catering to products and services of any other company.

For the sake of transparency of your online profile and activities, you are obliged to let your audience know that you’ll earn some commission every time they use those links, go to the source website and buy something.

All in all, affiliate links are a great way to uplevel your site with new strings of income without any initial investment or too much effort.

Why should you add an easy Affiliate Disclaimer to your WordPress site?

Well, disclosing your profit related actions through the affiliate links is one of the reasonable steps you can do to keep your web visitors informed and well aware of your working policy.

At this point, one of your basic goals is to provide your web viewers with useful and trustworthy links so that they can follow them and find something matching their needs.

Therefore, adding an affiliate links is half the job you can do. Another part includes your statement about them so that your audience can have a complete structure of your site and the additional (affiliate) ways it offers to them.

How to add an easy Affiliate Disclaimer to your WordPress site?

If you are making money from your WP website or blog through affiliate marketing, you should think of the proper ways to inform your audience about it.

Web visitors and readers are the most expensive capital you can have and you need to undertake every certain step to be quite sincere with them.

So, the truth is that you need to add an easy Affiliate Disclaimer to your WordPress site on every occasion you are inserting affiliate links.

Say, you are writing a post and adding an affiliate link pointing out some external product, service, review, etc., from which you have a payout. You should also include an affiliate disclaimer at the top of that post.

This mechanism should be working in relation to every such post you are publishing on your website.

You may say that adding affiliate disclaimer any time you are using affiliate links can be time consuming. Apart from that, you might forget about it occasionally.

Well, the methods we are going to share with you solve this problem and let you easily add an easy affiliate disclaimer to your WordPress site posts automatically, or with a simple click of a button.

1. Edit your functions.php file

In order to add affiliate disclaimers automatically, you need to copy and paste a relevant code into your functions.php.

You can find your functions.php file from Appearance, Theme Editor, functions.php file. Copy and Save this file into any text editor like Notepad. Now, find the relevant piece of code below and add it to the very bottom of the text editor:


function affiliate_the_content( $content ) {
 if( is_single() ) {
      if (has_tag('affiliate')) {
    $custom_content = '<div class="disclaimer">I’m disclosing that this post contains affiliate links, which means I may earn an affiliate commission you click on one. <a href="/affiliate-disclaimer">Read the full disclaimer here.</a></div>';
	}
   }
	    $custom_content .= $content;
    return $custom_content;
}
add_filter( 'the_content', 'affiliate_the_content' );

Now, save the updated file and that’s it. For now on, all you need to do is to tag any post containing such links with “Affiliate” and “I’m disclosing that this post contains affiliate links, which means I may earn an affiliate commission you click on one” will be added before each such post.

As you see, this code contains a specific disclaimer sentence and directs to a separate disclaimer page. Of course, it’s up to you to change and stylize the sentence, as well as add your URL.

Your URL should be located after href. E.g. <a href="/ http://www.yourwebsite.com/disclaimer“>

2. Install and use any of the relevant plugins

My Custom Functions:

My custom functions

download

If you are clueless about coding and are afraid to hamper the flawless performance of your site, you can use any relevant plugin instead.

My Custom Functions is one of such useful and lightweight plugins with a user optimized interface and handy toolbox. It will enable you to quickly add your custom functions and make them valid throughout your WP site.

Advanced Custom Fields:

Advanced Custom Fields

download

Advanced Custom Fields is the next practical plugin you can rely on when it comes to adding custom fields to your site’s post and pages.

This plugin is simple in usage and easy to follow. However, you need to spend some time on it if you want to add affiliate disclaimer, configure it the way you need and display it on your website through your child theme by using FTP.

You need to create a New Field Group, then Add Field and add Affiliate Disclaimer under Field Label. Further, select Checkbox under Field Type, and fill the box next to the Choice with Display Affiliate Disclaimer: Display Affiliate Disclaimer. This much for the background work.

Now, you need to showcase affiliate disclaimer for the frontend visitors. For this, you need to go to log into FTP, WP-Content, Themes and find all the themes installed on your site.

Find the parent theme folder and the file for single posts. Usually it is called single.php or something like that.

You need to copy its entire content into a text editor, go to the child theme, create a new file with the exact name as your single.php file, save it, then open and copy all the content you have previously copied into it.

In the newly created single.php file you may find different coding elements. Use the code below and copy it before the loop or at the beginning of the main div or box.


1.        // vars
2.        $affiliate = get_field('affiliate_disclaimer');
3.        // check
4.        if( $affiliate &amp;&amp; in_array('Display Affiliate Disclaimer', $affiliate) ): 
5.        <div class="affiliate_disclaimer">This post contains affiliate links.</div>
6.        endif; 
                                      

This code suggests that whenever you check the Affiliate Disclaimer checkbox, this text will be shown.

Naturally, you can change the default text to make it more user friendly or reasonable.

Pods – Custom Content Types and Fields:

Pods

download

Pods is another practical tool you can use along with the above mentioned Advanced Custom Fields Plugin for more controls over your site’s functionality.

About Sonl Sinha

Sonl SinhaSonl Sinha is a passionate writer as well as WordPress and WooCommerce rockstar who loves to share insights on various topics through his engaging blog posts. He runs a successful website design and digital marketing company. With 15+ years of experience in WordPress theme development, he strives to inform and inspire readers with his thought-provoking content. He helps thousands of small and medium businesses and startups create a unique online presence. Follow Sonl Sinha for your regular dose of knowledge and inspiration.

Do check out our free WP themes and WordPress themes bundle