Skip to content

Instantly share code, notes, and snippets.

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