The problem is that you are returning $content
from within a conditional statement that could potentially resolve as false (and will, in the case of pages, because is_single()
does not apply to pages).
Move your return to outside all “if” conditions to make sure that $content
is always returned, regardless of whether it is filtered or not:
function my_category_content ( $content ) {
global $post;
if ( is_single() ) {
if ( in_category( "", $post->ID ) ) {
$content .= 'Only showing up on the categories named mini [product_category category="mini" limit="12" columns="4" orderby="date" order="desc"]';
}
}
return $content;
}
add_filter( 'the_content', 'my_category_content' );