Site logo

Archived topic

Add Additional Tabs to Product's Page in Niche.

5 replies · Started by Deyson on January 23, 2022

Viewing posts 1–6 of 6

Hello and good day.

I wanted to know how we could add additional Tabs with a Block inside. My goal is to add an FAQ inside a separate Tab in addition to the Description and reviews.

Thank you and have an amazing day! 😊

Hello and thank you.

Would I be able to create content for the new tab using Generate Pro's Elements?

Thank you and have an amazing day! 😊

Hi there,

so this function which allows you to add your won tabs:

https://woocommerce.com/document/editing-product-data-tabs/#section-5

This part of the code:

function woo_new_product_tab_content() {

	// The new tab content

	echo '<h2>New Product Tab</h2>';
	echo '<p>Here\'s your new product tab.</p>';

        // Add a Hook into tab
        do_action('your_custom_product_tab_hook_name');
	
}

You can include your own custom hook ie. this line:

do_action('your_custom_product_tab_hook_name');

Whatever name you use instead of: your_custom_product_tab_hook_name you can use in a Block ( or Hook Element ) by selecting Custom Hook from the list and adding your hook name

Thank you, David! 😊

P.S. great work on Niche! It is beautiful!

Glad to be of help - and thanks for the kind feedback :)

This archived topic is closed to new replies.