Skip to content

Commit

Permalink
implemented Divi Affiliate Banner
Browse files Browse the repository at this point in the history
  • Loading branch information
versluis committed Aug 31, 2019
1 parent eba9ea3 commit 0588365
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
24 changes: 21 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,31 @@ function guru_getWordCountCommentsCurrentUser() {
return $count;
}

/* remove JetPack upsell messages */
/* https://mattreport.com/disable-jetpack-upsell-ads/ */
//
// remove JetPack upsell messages
// https://mattreport.com/disable-jetpack-upsell-ads/
add_filter( 'jetpack_just_in_time_msgs', '__return_false' );


//
// add Amazon oneLink shenanigans
function guru_amazonOneLink() {
$oneLink = '<div id="amzn-assoc-ad-5e4fb363-4081-411a-8049-667d48d2b006"></div><script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=5e4fb363-4081-411a-8049-667d48d2b006"></script>';
echo $oneLink;
}
add_action ('wp_footer', 'guru_amazonOneLink');
add_action ('wp_footer', 'guru_amazonOneLink');

//
// add Divi Banner at the top of the page
// @since 2.0
function showDiviBanner () {
// build the banner
$divi = '<a href="https://www.elegantthemes.com/affiliates/idevaffiliate.php?id=6674_5_1_20" target="_blank" rel="nofollow"><img style="border:0px" src="https://www.elegantthemes.com/affiliates/media/banners/divi_728x90.jpg" width="728" height="90" alt="Divi WordPress Theme"></a>';
$banner = '<div align="center">' . $divi . '</div>';

// if we're logged in, don't show the banner
if (!is_user_logged_in()) {
echo $banner;
}
}
add_action ('get_header', 'showDiviBanner');
3 changes: 2 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Template: twentythirteen
CHANGELOG
=========
2.0 - June 2019
2.0 - June/September 2019
removed podcast icons from home page
added full-width page template (or tried at least)
added Divi affiliate banner at the top
v1.9 - December 2018
added Amazon OneLink code to footer
Expand Down

0 comments on commit 0588365

Please sign in to comment.