{"id":3772,"date":"2018-11-22T02:33:44","date_gmt":"2018-11-22T02:33:44","guid":{"rendered":"https:\/\/docs.contentviewspro.com\/?p=3772"},"modified":"2023-12-27T11:32:45","modified_gmt":"2023-12-27T11:32:45","password":"","slug":"to-not-display-posts-from-a-certain-category-tag","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/to-not-display-posts-from-a-certain-category-tag\/","title":{"rendered":"Hide posts from a certain category\/tag"},"content":{"rendered":"<p>To hide posts from a certain category\/tag:<\/p>\n<ul>\n<li>If you are NOT filtering in other categories, you can select the category you want to exclude, then select the <code>NOT IN<\/code> operator, as below:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.contentviewspro.com\/wp-content\/uploads\/2019\/11\/not-in-category.png\" alt=\"not in category\" \/><\/li>\n<li>If you are filtering in other categories, to exclude posts from a category, please use this shortcode:\n<pre style=\"font-size:13px\">\n&#91;pt_view id=\"VIEW_ID\" reuse_tax_query=1 cat=\"SLUG_OF_CATEGORY_TO_EXCLUDE\" operator=\"NOT IN\"&#93;\n<\/pre>\n<p><em>(this shortcode with extra parameters is only available in Pro version)<\/em><\/p>\n<p>Please replace SLUG_OF_CATEGORY_TO_EXCLUDE with slug of category you want to exclude, replace VIEW_ID with <a href=\"https:\/\/contentviewspro.com\/documentation\/article\/what-is-id-of-a-view\/\">ID of your View<\/a>.<\/p>\n<p>To do this for <strong>Tag<\/strong>, please use this shortcode instead:<\/p>\n<pre style=\"font-size:13px\">\n&#91;pt_view id=\"VIEW_ID\" reuse_tax_query=1 tag=\"SLUG_OF_TAG_TO_EXCLUDE\" operator=\"NOT IN\"&#93;\n<\/pre>\n<\/li>\n<\/ul>\n<p>Best regards,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To hide posts from a certain category\/tag: If you are NOT filtering in other categories, you can select the category you want to exclude, then select the NOT IN operator, as below: If you are filtering in other categories, to exclude posts from a category, please use this shortcode: &#91;pt_view id=&#8221;VIEW_ID&#8221; reuse_tax_query=1 cat=&#8221;SLUG_OF_CATEGORY_TO_EXCLUDE&#8221; operator=&#8221;NOT IN&#8221;&#93; &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/to-not-display-posts-from-a-certain-category-tag\/\"> <span class=\"screen-reader-text\">Hide posts from a certain category\/tag<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[9],"doc_tag":[],"class_list":["post-3772","docs","type-docs","status-publish","hentry","doc_category-how-to"],"year_month":"2026-09","word_count":130,"total_views":"3","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin1","author_nicename":"admin1","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/admin1\/"},"doc_category_info":[{"term_name":"How To","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/how-to\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/3772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=3772"}],"version-history":[{"count":1,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/3772\/revisions"}],"predecessor-version":[{"id":5456,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/3772\/revisions\/5456"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=3772"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=3772"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=3772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}