{"id":2400,"date":"2017-10-17T10:44:39","date_gmt":"2017-10-17T10:44:39","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=2400"},"modified":"2017-10-17T10:44:39","modified_gmt":"2017-10-17T10:44:39","password":"","slug":"show-thumbnail-without-hyperlink","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/show-thumbnail-without-hyperlink\/","title":{"rendered":"Show thumbnail without hyperlink (disable link of thumbnail)"},"content":{"rendered":"<p>Content Views helps you to show post&#8217;s thumbnail image easily without coding.<br \/>\nBy default, thumbnail is linked to the post. <\/p>\n<h2># Disable thumbnail link for all posts in View<\/h2>\n<p>To show thumbnail image without link for a View, please add this code to file <strong>functions.php<\/strong> of your active theme:<\/p>\n<pre style=\"font-size:13px\">\n\/\/ Content Views Pro - Show thumbnail without hyperlink\nadd_filter( 'pt_cv_field_thumbnail_nolink', 'cvp_theme_field_thumbnail_nolink' );\nfunction cvp_theme_field_thumbnail_nolink( $args ) {\n\tglobal $pt_cv_id;\n\tif ( $pt_cv_id === 'VIEW_ID' ) {\n\t\t$args = true;\n\t}\n\n\treturn $args;\n}\n<\/pre>\n<p>(replace <strong>VIEW_ID<\/strong> with <a href=\"https:\/\/contentviewspro.com\/documentation\/article\/what-is-id-of-a-view\/\">ID of your View<\/a>)<\/p>\n<h2 id=\"specific\"># Disable thumbnail link of some posts only<\/h2>\n<p>Please add this code to file <strong>functions.php<\/strong> of your active theme:<\/p>\n<pre style=\"font-size:13px\">\n\/\/ Content Views Pro - Show thumbnail without hyperlink\nadd_filter( 'pt_cv_field_thumbnail_nolink', 'cvp_theme_field_thumbnail_nolink_some' );\nfunction cvp_theme_field_thumbnail_nolink_some( $args ) {\n\tglobal $pt_cv_id, $post;\n\tif ( $pt_cv_id === 'VIEW_ID' && in_array( $post->ID, array( 10, 20, 30 ) ) ) {\n\t\t$args = true;\n\t}\n\n\treturn $args;\n}\n<\/pre>\n<p>(replace <strong>VIEW_ID<\/strong> with <a href=\"https:\/\/contentviewspro.com\/documentation\/article\/what-is-id-of-a-view\/\">ID of your View<\/a>; replace <strong>10, 20, 30<\/strong> with IDs of the posts)<\/p>\n<p>Best regards,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Content Views helps you to show post&#8217;s thumbnail image easily without coding. By default, thumbnail is linked to the post. # Disable thumbnail link for all posts in View To show thumbnail image without link for a View, please add this code to file functions.php of your active theme: \/\/ Content Views Pro &#8211; Show &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/show-thumbnail-without-hyperlink\/\"> <span class=\"screen-reader-text\">Show thumbnail without hyperlink (disable link of thumbnail)<\/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":[25],"doc_tag":[21,16],"class_list":["post-2400","docs","type-docs","status-publish","hentry","doc_category-adjustment","doc_tag-custom-code","doc_tag-thumbnail"],"year_month":"2026-09","word_count":182,"total_views":"2","reactions":{"happy":"1","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\/"},{"term_name":"thumbnail","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/thumbnail\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/2400","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=2400"}],"version-history":[{"count":0,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/2400\/revisions"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=2400"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=2400"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=2400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}