How to Edit/Remove, Rename, and Reorder Product Data Tabs

How to Edit/Remove, Rename, and Reorder Product Data Tabs

By default, the “Description and Additional Information” tabs appear on the site. You can also, add the custom tabs, and the Global tab “Size Guide” on products.

1. DESCRIPTION TAB:

While editing a product when you add the content in this main area, it will appear in the product description tab. See the images below:

2. ADDITIONAL INFORMATION TAB:

The “Additional Information Tab” contains the product’s necessary information on the attributes. All the attributes you added to the product will appear in this tab as you can see in the below images:

3. CUSTOM TABS:

Our theme support additional custom tabs for the products. If you want to show more tabs with your own custom content in them you can set it by just editing a product. There you will see the option for the custom tab simply set the content in it then save settings and check back to the product after clearing the browser cache. Please refer to the below image:

4. SIZE GUIDE:

By default, it’s set to the global tab. You can find the global tab option in the PORTO >> Theme Options >> WooCommerce >> Single Product >> See the below image:

As you can see in the above image the custom tab block slug is added, so the “Size Guide” tab content is coming from the blocks. In order to edit it navigate to the Dashboard >> PORTO >> Template Builder >> there you will find the “Size Guide” tab block simply edit it as per your need then save settings and check back to your site after clearing the browser cache.

 

Now, How to remove the tabs:

If you want to remove the tabs simply use the below code in the child theme >> functions.php file.

/**

* Remove product data tabs

*/

add_filter( ‘woocommerce_product_tabs’, ‘woo_remove_product_tabs’, 98 );

function woo_remove_product_tabs( $tabs ) {

unset( $tabs[‘description’] ); // Remove the description tab

unset( $tabs[‘reviews’] ); // Remove the reviews tab

unset( $tabs[‘additional_information’] ); // Remove the additional information tab

return $tabs;

}

Then save the file and check back to your site product page after clearing the browser cache.

 

Now, How to rename the tabs:

If you want to rename the tabs simply use the below code in the child theme >> functions.php file.

/**

* Rename product data tabs

*/

add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 );

function woo_rename_tabs( $tabs ) {

$tabs[‘description’][‘title’] = __( ‘More Information’ ); // Rename the description tab

$tabs[‘reviews’][‘title’] = __( ‘Ratings’ ); // Rename the reviews tab

$tabs[‘additional_information’][‘title’] = __( ‘Product Data’ ); // Rename the additional information tab

return $tabs;

}

Then save the file and check back to your site product page after clearing the browser cache.

 

Now, How to reorder the tabs:

If you want to reorder the tabs simply use the below code in the child theme >> functions.php file.

/**

* Reorder product data tabs

*/

add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );

function woo_reorder_tabs( $tabs ) {

$tabs[‘reviews’][‘priority’] = 5; // Reviews first

$tabs[‘description’][‘priority’] = 10; // Description second

$tabs[‘additional_information’][‘priority’] = 15; // Additional information third

return $tabs;

}

Then save the file and check back to your site product page after clearing the browser cache.

Hope this helps.


By porto_admin |