Add an Affiliate Disclosure Statement Using Jetpack

Wordpress

Affiliate Disclosure Statement: Using Jetpack Widgets Affiliate Disclosure Statement: Using Jetpack Widgets

Are you using affiliate marketing links on your blog? Looking for a solution to easily add an affiliate disclosure statement so you can be compliant with the FTC Endorsement Guides? You might already have the perfect solution at your fingertips!

This article with walk you through how you can include an affiliate disclosure statement on your blog using Jetpack, a commonly installed and feature-rich plugin for WordPress. Let’s get started.

What is an Affiliate Disclosure Statement?

Let’s be honest. Nobody likes to crap up their blog articles with legal disclosures and notices. However, if you usually have to jump through a few hoops in order to legally make money. That’s just the way business works.

An affiliate disclosure statement is a bit of text that you are supposed to add to every page on your website that uses affiliate, sponsored, or endorsed links. The statement is intended to let them know that you will receive compensation if they choose to follow certain affiliated links.

Affiliate Disclosure Statement - Example from Tiny Kitchen Cuisine
An example of an Affiliate Disclosure State as seen on Tiny Kitchen Cuisine.

It provides transparency to your readers about your statements on the page. An affiliate disclosure statement gives your readers a chance to make a well-informed decision about whether or not they want to purchase the product or service that you are recommending. It’s the fine print and your readers appreciate it.

Why use Jetpack?

Love it or hate it, Jetpack for WordPress is a very popular plugin by Automattic, the company that built WordPress. Some hosting providers even install it automatically when you run their one-click WordPress installations.

What Jetpack does is give your self-hosted WordPress installation access to many of the features that people who run blogs on WordPress.com enjoy. This includes things like website site statistics, two-factor authentication for logins, social media scheduling, page speed optimizations, and enhanced security that prevents brute force attacks, malware, and spam. It’s quite the action-packed suite of tools for WordPress.

However, it’s huge. Because it offers so many enhancements to your self-hosted WordPress site, it’s a pretty big plugin. If you’re already using Jetpack with your WordPress installation, one way to offset its size is to use it more.

How to Add an Affiliate Disclosure Statement Using Jetpack and Widgets

There are numerous third-party affiliate disclosure plugins available for WordPress. Why install an additional plugin when you don’t have to? By using WordPress’ built-in Widgets feature, you can easily add this affiliate disclosure statement and customize how it appears on your blog.

Review and Prepare Your Theme

To add this affiliate disclosure statement, we’re going to be working in your WordPress administration’s Appearance & Widgets area. The first step is going to be to review your theme. In order for this to work you need to have three things available with your WordPress installation:

  1. Jetpack for WordPress installed and activated.
  2. A theme that supports custom sidebars (a.k.a. widget areas).
  3. A widget area that loads content before each of your posts.

Check to see if your theme supports custom sidebars by clicking on Appearance and then Widgets. If your theme already has a section prepared for adding content before your posts, proceed to the this section of the article.

Otherwise, we need to set up a widget area that you can tap into. Don’t worry, it seems daunting at first. It’s actually pretty easy.

Add a Widget Section to Your Theme

The first thing we want to do is tell WordPress all about the new widget area. In your theme’s functions.php file, add the following code:

/**
* Register widgetized area
*/

function before_post_entry_widgets_init() {
register_sidebar( array(
'name' => 'Before Entry',
'id' => 'before-entry-widgets'
) );
}

add_action( 'widgets_init', 'before_post_entry_widgets_init' );

The next step will be to tell your theme where to use this widget area. There are many different complex ways that themes set up their template files, so the easiest way to tell your theme where you want to include your new widget area is to use what’s called a hook.

A hook is like a bookmark. It references a section of programming within WordPress and gives you a way to easily insert your own custom code without having to hunt for specifics functions or alter important files.

Let’s add the following code right below the other code in your theme’s functions.php file:

function before_post_entry_widget( $content ) {
if ( is_singular( array( 'post', 'page' ) ) && is_active_sidebar( 'before-entry-widgets' ) && is_main_query() ) {
?>
<ul class="before-entry-content">
<?php dynamic_sidebar( 'before-entry-widgets' ); ?>
</ul>
<?php
}
return $content;
}

add_filter( 'the_content', 'before_post_entry_widget' );

The above code displays a new widget area before the content on all single posts and pages throughout your theme. This section can be styled in your style.css by targeting the class .before-entry-content.

This code assumes your theme is using the standard hook: `the_content`.

If your theme has created its own hooks (Genesis and Genesis child themes are a good example) you should use their preferred hooks in place of the_content. Check with your theme developer for more information.

When you’re all done, upload you new functions.php file over your old one and refresh your site. Your new widget area will now be accessible from within the WordPress administration Appearance > Widgets section.

Add Your Affiliate Disclosure Statement

  • Click on Appearance > Widgets
  • Add a custom HTML widget to the Before Post Entry widget area.
  • Enter your affiliate disclosure statement.
  • Click Save.

It’s as easy as that! If you visit any one of your single posts or pages, you should now see your affiliate disclosure statement.

Customize the Visibility

Let’s say you wanted multiple affiliate disclosure statements on your website or you only wanted your disclosure to appear on posts in a specific category or with a specific tag. You can make this happen with Jetpack too!

  • In your widget, click on Visibility.
  • Choose the visibility settings that work for you.
  • Click Save.

Now, only the page or posts that match those visibility settings will have the affiliate disclosure statement added before its entries! Customize these visibility settings as you see fit. What works for some blogs might not work for others. Don’t be afraid to experiment and make adjustments until you find that works for your site.

If for some reason you don’t see the Visibility button (it will be located next to the widget’s Save button), you might need to turn on that module in Jetpack. Visit /<your domain name>/wp-admin/admin.php?page=jetpack_modules to access the Jetpack Modules page. Locate Widget Visibility in the list and click on it to activate or deactivate it. Once it has been activated, return to the Appearance > Widgets area and you should see the Visibility button.

That’s it! Neat, huh?

By getting creative with the features that Jetpack’s modules already offer, you can eliminate the need for additional plugins. Avoid installing unnecessary plugins that provide duplicate features and you can keep your WordPress installation snappy and lightweight! Get the job done with the tools you already have and this easy setup guide.

Did this article help you? Don’t forget to share it!

You may also like

Leave a Reply

avatar
  Subscribe  
Notify of
shares