-
-
Save nutsandbolts/03744e609c1a62c46521 to your computer and use it in GitHub Desktop.
Affiliate disclosure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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