Home Forums WoodMart support forum Custom Product Tab Slug Change

Custom Product Tab Slug Change

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #114485

    webresultat
    Participant

    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

    #114528

    Hello,

    There is no option to change this slug. It will require complicated customization not covered by our support.

    Best Regards

    #114542

    webresultat
    Participant

    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.

    #114583

    Artem Temos
    Keymaster

    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;
    }
    #114726

    webresultat
    Participant

    Thank you! It’s working fine!
    Greetings

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Custom Product Tab Slug Change’ is closed to new replies.