Skip to content

Instantly share code, notes, and snippets.

@nutsandbolts nutsandbolts/functions.php Secret
Created Jan 1, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.