Add Affiliate Disclaimer To Posts in Carbonate

by Josh Koop | Last Updated: February 13, 2021
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 disclaimer information for more details.

If you are looking to add a disclaimer to your website to be within the FTC guidelines and the Amazon TOS you must have this disclaimer be clear and prior to any links.

For this reason this code is the easiest way to add this to your site while also allowing it to adapt to the screen as required.

To add this to your Carbonate theme is pretty simple and requires only adding one section to your posts file and a addition of CSS to style the text.

Find this section in your single.php:

<?php the_content(); ?>

Copy the text below and you want to paste it above the code section listed above. This code adds a div and adds a class of disclaimer which we can use to target for CSS.

<div class="disclaimer"><!--googleoff: index-->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.<!--googleon: index--></div>

The section that shows googleoff tells the crawler to not index the text contained within and then re-enabled the indexing area after your disclaimer which helps to have it not show in the Google SERP.

The final code should appear similar to this:

<div class="disclaimer"><!--googleoff: index-->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.<!--googleon: index--></div>
<?php the_content(); ?>

Once you have added the code and you look on the front end it looks just like the other text from your post, you want to differentiate it from the rest with custom CSS.

For Carbonate this can easily be added to the styles.css which for myself I add to the very bottom, I easily add a note section to track the code I add, though it is possible to use Customize.

/*********************************************************
    CUSTOM CSS 
*********************************************************/
.disclaimer {
    font-size: smaller;
    background-color: cornflowerblue;
    color: white;
    padding: 15px;
}

This is the colors I have used for my disclaimer section, feel free to modify as necessary to suit your site.

If you find this helpful please feel free to donate spare change (if you can) over here.

I love technology, I have plenty of technical side experience but never really thought of blogging as a way to earn an income. With everything that has gone on in the last couple years and the instability of the job markets I started to learn how to blog and build affiliate niche sites to add more income channels to give me the chance to break free from the financial chains that bind me and find real freedom!