Hello,
I need to change the way of items listing under a category, I tried with the following code:
$categoryId = 12;
add_filter('the_content', 'wpOfferCats');
function wpOfferCats($content){
global $wp_query, $cat, $categoryId, $post;
if ( $cat == $categoryId) {
return "TEST REPLACE!!!";
}else{
return $content;
}
}
But this will TEST REPLACE!!! to the text.
Thanks