Created
September 22, 2017 13:07
-
-
Save MikeNGarrett/d8ad36464aaac432c22322ef9afb99f7 to your computer and use it in GitHub Desktop.
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 | |
add_filter('the_content','add_my_content'); | |
function add_my_content($content) { | |
$my_custom_text = '<hr><div class="patreonpara"><p><em>PARAGRAPH TEXT</em></p><a href="LINKURL" data-patreon-widget-type="become-patron-button" class="patreonbutton"><img src="FILEURL"></a></div>'; | |
$my_custom_text_other = 'something else'; | |
if(is_single() && !is_home()) { | |
if(in_category('videos')) { | |
$content .= $my_custom_text_other; | |
} else { | |
$content .= $my_custom_text; | |
} | |
} | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment