Remove Permanent URL for custom post types

To get this to work, you’ll probably need to set multiple arguments to get exactly the way you want. In situations like this, I usually start by settings the public argument to false and then adding in everything that I do want displayed. In this case, setting public to false also sets publicly_queryable to false … Read more

exclude posts from a custom category

If you want to exclude posts from a particular category then you could try putting this in your functions.php function exclude_posts_from_category( $query ) { $catname = “Put you category name here”; if ( $query->is_category() && ( $catname == $query->query_vars[‘category_name’] ) ) { $query->query_vars[‘post__not_in ‘] = array( 1, 2, 3 ); } } add_action( ‘pre_get_posts’, ‘exclude_posts_from_category’ … Read more