Skip to content

Instantly share code, notes, and snippets.

@nutsandbolts
Created January 1, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nutsandbolts/03744e609c1a62c46521 to your computer and use it in GitHub Desktop.
Save nutsandbolts/03744e609c1a62c46521 to your computer and use it in GitHub Desktop.
Affiliate disclosure
<?php // Don't include the opening PHP tag
//* Add affiliate disclosure to single posts
add_action( 'genesis_entry_footer', 'nabm_affiliate_disclosure', 9 );
function nabm_affiliate_disclosure() {
if ( is_single() && !is_archive() ) { ?>
<div class="aff-disclosure">
<p>Posts on this site often contain affiliate links, which means we receive a small commission if you purchase a product after clicking the link. We only promote products that we actually use and enjoy, and our <a href="https://www.nutsandboltsmedia.com/resources/">reviews</a> are honest - no pimping random junk just to earn money! Affiliate income allows us to spend time creating free tutorials, so we\'d appreciate the clicks. If you prefer that we not receive credit, feel free to do a web search for the product instead.</p>
</div>
<?php }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment