Custom Product Tab Slug Change
-
Hi,
on products I can create a custom tab and give it a name and body in product creation.
On frontend the URL slug for this tab is #tab-woodmart_custom_tab .
How can I change the name of this slug?
thanks for your help
greetings
Hello,
There is no option to change this slug. It will require complicated customization not covered by our support.
Best Regards
But as we want to create a public page we do not want to have “woodmart” branding on our website through this tab name.
I cannot believe that this is complicated customization, as it’s only about the anchor name of the tab…
please help us here, as we want to have a professional website where no inappropriate link or anchor names are set.
If you cannot help on your own, please at least provide me the location of this code so i could try to change it on my own.
thanks for your help.
greetings.
Try to add the following PHP code snippet to the child theme functions.php file to change this
function woodmart_custom_product_tabs( $tabs ) {
$additional_tab_title = woodmart_get_opt( 'additional_tab_title' );
$custom_tab_title = get_post_meta( get_the_ID(), '_woodmart_product_custom_tab_title', true );
if ( $additional_tab_title ) {
$tabs['woodmart_additional_tab'] = array(
'title' => $additional_tab_title,
'priority' => 50,
'callback' => 'woodmart_additional_product_tab_content'
);
}
if ( $custom_tab_title ) {
$tabs['my_custom_tab'] = array(
'title' => $custom_tab_title,
'priority' => 60,
'callback' => 'woodmart_custom_product_tab_content'
);
}
return $tabs;
}
Thank you! It’s working fine!
Greetings
The topic ‘Custom Product Tab Slug Change’ is closed to new replies.