Title: Hide tabe with empty fields
Last modified: February 27, 2025

---

# Hide tabe with empty fields

 *  Resolved [sgucci1](https://wordpress.org/support/users/sgucci1/)
 * (@sgucci1)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/hide-tabe-with-empty-fields/)
 * Is it possible to hide (not display) a custom tab on a product pae if there is
   no info available. For instance, we want to add a video tab to product pages,
   but not all products will have a video. For the products with no video, I would
   like the tab to not display.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [MD Imran Khan](https://wordpress.org/support/users/imranwpb/)
 * (@imranwpb)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/hide-tabe-with-empty-fields/#post-18333494)
 * Hi [@sgucci1](https://wordpress.org/support/users/sgucci1/),
 * Hope you are doing good. Thanks for showing interest in this plugin.
 * If this is the only purpose, you don’t need this plugin. You can do it by adding
   a few line of PHP code. All you have to check if the video meta value is present
   then show a custom with that video in the tab content.
   You can find more details
   how it can be done here in our blog: [https://wpbean.com/add-edit-customize-woocommerce-product-tabs/](https://wpbean.com/add-edit-customize-woocommerce-product-tabs/)
   Here is an example of it, Just add your video meta key in this code:
 *     ```wp-block-code
       add_filter( 'woocommerce_product_tabs', function($tabs){    global $product;    $id = $product->get_id();    $video =  get_post_meta( $id, 'your_video_meta_key_here', true );    if(isset($video) && '' != $video){        $tabs['custom_video_tab'] = array(            'title'       => 'Video',            'priority'    => 30,            'callback'    => 'wpb_product_custom_video_tab_content'        );    }    return $tabs;} );function wpb_product_custom_video_tab_content() {    global $product;    $id = $product->get_id();    $video =  get_post_meta( $id, 'your_video_meta_key_here', true );    echo $video;}
       ```
   
 * BTW with the premium version, You can add custom tabs only for selected tabs 
   and show product custom meta without adding any custom code.
 * Thank You
 *  Thread Starter [sgucci1](https://wordpress.org/support/users/sgucci1/)
 * (@sgucci1)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/hide-tabe-with-empty-fields/#post-18333599)
 * Thanks for the quick response.
 * Actually there are other uses, this was just one example.
 * Basically we do not want a custom tab to display if the tab field is empty.  
   Whether it is a video tab, more info tab, replacement products tab, faq, etc.
 * Are you saying your premium version will do this?
 *  Plugin Contributor [MD Imran Khan](https://wordpress.org/support/users/imranwpb/)
 * (@imranwpb)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/hide-tabe-with-empty-fields/#post-18334941)
 * In the premium version you can add custom tabs in the product edit page. This
   tab will be visible only for that particular product. You can add any type content
   including shortcodes in the tab editor.
 * So you don’t need any custom meta fields here. You can add your video, FAQ, info,
   etc. content directly in the tab content editor.
   If you want to try it, please
   send me an email using this form: [https://wpbean.com/support](https://wpbean.com/support)
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide tabe with empty fields’ is closed to new replies.

 * ![](https://ps.w.org/wpb-woocommerce-custom-tab-manager/assets/icon-256x256.gif?
   rev=2895086)
 * [WPB Custom Tab Manager for WooCommerce – Add, Edit & Reorder Tabs](https://wordpress.org/plugins/wpb-woocommerce-custom-tab-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpb-woocommerce-custom-tab-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpb-woocommerce-custom-tab-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wpb-woocommerce-custom-tab-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpb-woocommerce-custom-tab-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpb-woocommerce-custom-tab-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [MD Imran Khan](https://wordpress.org/support/users/imranwpb/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/hide-tabe-with-empty-fields/#post-18334941)
 * Status: resolved