Viewing 1 replies (of 1 total)
  • function rpl_change_ptype( $args ) {
      $args['category_name'] = 'your_category_name_goes_here';
    
      return $args;
    }
    add_filter( 'random_post_args', 'rpl_change_ptype' );

    I took it from previus topic for custom post types, but its working as any other filter (category, tag, etc)

Viewing 1 replies (of 1 total)
  • The topic ‘Limit to a category’ is closed to new replies.