{"id":1916,"date":"2017-02-01T11:02:59","date_gmt":"2017-02-01T11:02:59","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=1916"},"modified":"2024-04-06T03:36:40","modified_gmt":"2024-04-06T03:36:40","password":"","slug":"hide-view-no-posts-found","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/hide-view-no-posts-found\/","title":{"rendered":"Hide the &#8220;No posts found&#8221; message"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Since Content Views 3.7.0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When using our shortcode, you can hide this message by:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>select the &#8220;Show custom text&#8221; for Display Settings >> Others >> When No Posts Found<\/li>\n\n\n\n<li>leave the text field empty\/blank<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"484\" height=\"153\" src=\"https:\/\/contentviewspro.com\/documentation\/wp-content\/uploads\/2024\/04\/image-3.png\" alt=\"\" class=\"wp-image-5892\" srcset=\"https:\/\/contentviewspro.com\/documentation\/wp-content\/uploads\/2024\/04\/image-3.png 484w, https:\/\/contentviewspro.com\/documentation\/wp-content\/uploads\/2024\/04\/image-3-300x95.png 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When using our blocks, please do the same in Layout >> When No Posts Found.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"text-decoration: underline;\">This way works for each view\/block. To hide for all views\/blocks, please check the solutions below.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Content Views 3.6.4 and before<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To hide that message, please use this CSS:<br><pre style=\"font-size: 13px;\">.pt-cv-no-post {display:none}<br><\/pre><br><p>With Pro version, please add the code to <strong>Custom CSS<\/strong> field in the Content Views >> Settings page.<br>With Free version, please check <a href=\"https:\/\/contentviewspro.com\/documentation\/article\/add-custom-css-content-views-free-version\/\">this document about adding custom CSS<\/a>.<\/p><br><\/li>\n\n\n\n<li>To prevent completely that message from being shown, please add this code to file <strong>functions.php<\/strong> of your active theme:<br><pre style=\"font-size: 13px;\">\/\/ Content Views Pro - Disable empty result<br>add_filter( 'pt_cv_hide_empty_result', '__return_true' );<br><\/pre><br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since Content Views 3.7.0 When using our shortcode, you can hide this message by: When using our blocks, please do the same in Layout >> When No Posts Found. This way works for each view\/block. To hide for all views\/blocks, please check the solutions below. Content Views 3.6.4 and before Thank you,<\/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":[25],"doc_tag":[21],"class_list":["post-1916","docs","type-docs","status-publish","hentry","doc_category-adjustment","doc_tag-custom-code"],"year_month":"2026-09","word_count":145,"total_views":"4","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":"Adjustment","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/adjustment\/"}],"doc_tag_info":[{"term_name":"custom PHP code","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/custom-code\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1916","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=1916"}],"version-history":[{"count":8,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1916\/revisions"}],"predecessor-version":[{"id":5898,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1916\/revisions\/5898"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=1916"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=1916"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=1916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}