{"id":528,"date":"2022-06-12T07:54:35","date_gmt":"2022-06-12T07:54:35","guid":{"rendered":"https:\/\/demo.wpartisan.net\/developmentsite\/how-to-hide-remove-products-tabs-content-panel-title\/"},"modified":"2024-11-04T03:28:29","modified_gmt":"2024-11-04T03:28:29","slug":"how-to-hide-remove-products-tabs-content-panel-title","status":"publish","type":"quick-tips","link":"https:\/\/demo.wpartisan.net\/developmentsite\/how-to-hide-remove-products-tabs-content-panel-title\/","title":{"rendered":"How to hide\/remove products tabs content panel title"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Before showing the filter hooks, first, if we saw the product default tabs in the code, we can see the tabs array items like this:<\/p>\n\n\n\n<pre class=\"wp-block-code \\&quot;wp-block-code\\&quot;\"><code class=\"\">$tabs['description'] = array(\n\t'title'    => __( 'Description', 'woocommerce' ),\n\t'priority' => 10,\n\t'callback' => 'woocommerce_product_description_tab',\n);\n\n$tabs['additional_information'] = array(\n\t'title'    => __( 'Additional information', 'woocommerce' ),\n\t'priority' => 20,\n\t'callback' => 'woocommerce_product_additional_information_tab',\n);\n\n$tabs['reviews'] = array(\n\t\/* translators: %s: reviews count *\/\n\t'title'    => sprintf( __( 'Reviews (%d)', 'woocommerce' ), $product->get_review_count() ),\n\t'priority' => 30,\n\t'callback' => 'comments_template',\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the above tabs array, we can see the callback functions loading the content of those tabs, including the content panel titles. So, to remove content panel titles, we need to inspect the callback function code, which is loading the template file from WooCommerce template directory(wc_get_template( &#8216;single-product\/tabs\/description.php&#8217; );). There is a filter option on those template files, and we can utilize this filter option to remove the heading like the one below:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To remove Description content panel heading, use this:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>add_filter( 'woocommerce_product_description_heading', '__return_null' );<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To remove Additional information content panel heading, use this:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>add_filter( 'woocommerce_product_additional_information_heading', '__return_null' );<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>We can not remove the Reviews content panel heading because it has no filter option to filter the content panel heading<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>We can remove review content panel heading using this :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code \\&quot;wp-block-code\\&quot;\"><code class=\"\">add_action('admin_footer', 'reviews_content_panel_heading_remove');\n\nfunction reviews_content_panel_heading_remove() {\n  echo '&lt;style>\n\th2.woocommerce-Reviews-title {display:none;}\n  &lt;\/style>';\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full \\&quot;wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"284\" src=\"https:\/\/demo.wpartisan.net\/developmentsite\/wp-content\/uploads\/2022\/06\/Remove-tab-content-heading-1024x284-1.png\" alt=\"\" class=\"wp-image-2232\" srcset=\"https:\/\/demo.wpartisan.net\/developmentsite\/wp-content\/uploads\/2022\/06\/Remove-tab-content-heading-1024x284-1.png 1024w, https:\/\/demo.wpartisan.net\/developmentsite\/wp-content\/uploads\/2022\/06\/Remove-tab-content-heading-1024x284-1-300x83.png 300w, https:\/\/demo.wpartisan.net\/developmentsite\/wp-content\/uploads\/2022\/06\/Remove-tab-content-heading-1024x284-1-768x213.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To remove the product tab&#8217;s content panel title, we need to use the &#8216;woocommerce_product_description_heading&#8217; and &#8216;woocommerce_product_additional_information_heading&#8217; filter hooks like the one below:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"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":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"tags":[],"topics":[43,44,45],"class_list":["post-528","quick-tips","type-quick-tips","status-publish","hentry","topics-woocommerce","topics-woocommerce-query","topics-wordpress"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"WPArtisan","author_link":"https:\/\/demo.wpartisan.net\/developmentsite\/author\/developmentsiteauth\/"},"uagb_comment_info":0,"uagb_excerpt":"To remove the product tab's content panel title, we need to use the 'woocommerce_product_description_heading' and 'woocommerce_product_additional_information_heading' filter hooks like the one below:","_links":{"self":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/quick-tips\/528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/quick-tips"}],"about":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/types\/quick-tips"}],"author":[{"embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/comments?post=528"}],"wp:attachment":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/media?parent=528"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/tags?post=528"},{"taxonomy":"topics","embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/topics?post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}