Code:
function add_post_content($content) {
if(!is_feed() && !is_home()) {
$content .= '<p>This article is copyright © '.date('Y').' '.bloginfo('name').'</p>';
}
return $content;
}
add_filter('the_content', 'add_post_content');
That code shows on single post,search, categories.
how can I show this to single post only? hope you can help me with this thanks.
---------- Post added at 06:50 AM ---------- Previous post was at 06:37 AM ----------
fix it already. thread closed.
function add_after_post_content($content) {
if(!is_feed() && !is_home() && is_singular() && is_main_query()) {
$content .= '
Content that is added after the post content.
';
}
return $content;
}
add_filter('the_content', 'add_after_post_content');