How to replace category items with plugin?


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!!!";    
      return $content;

But this will TEST REPLACE!!! to the text.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.