This topic has 21 replies, 4 voices, and was last updated 2 years, 6 months ago ago by Rose Tyler
Hi,
is it somehow possible in this theme to simply change the text of the default product page tabs to a different one?
For example I want to rename “Additional Information” to “Specifications”
Attached the screenshot:
Kind regards
Michal
thank you. That will definitely help.
But these mention only the default tabs. Can you please let me know, how to add a line for the custom tabs created with your theme?
Renaming is easy, because I set the name of the tab when creating it. But when I want to change the order, I need to know how it is called in the theme.
For example I have created a custom tab called “Processing Time” and I would like to rearrange it to be on top of all tabs.
Do you think the code below from Woocommerce help pages will work on this custom tab?
/**
* Reorder product data tabs
*/
add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );
function woo_reorder_tabs( $tabs ) {
$tabs[‘processing_time’][‘priority’] = 5; // Processing first
$tabs[‘description’][‘priority’] = 10; // Description second
$tabs[‘additional_information’][‘priority’] = 15; // Additional information third
$tabs[‘reviews’][‘priority’] = 20; // Reviews fourth
return $tabs;
}
one note is, that when I tried just to rename the default tabs based on the woocommerce tutorial, I get fatal errors from your theme
I have used the following snippet in my child theme functions.php
/**
* Rename product data tabs
*/
add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 );
function woo_rename_tabs( $tabs ) {
$tabs[‘additional_information’][‘title’] = __( ‘Specifications’ ); // Rename the additional information tab
return $tabs;
}
Hello,
Provide us with WP Dashboard and FTP access to your site to check the code and help you.
Regards
Hi,
kindly check PM. Limited access to FTP THemes directory and limited admin privileges to backend to theme and settings related areas.
Hello,
I’ve passed your question to one of our developers. I will let you know once get an answer. Our developers team will be back at work after the weekend. Please be patient.
Regards
Hello,
Changes were done in /xstore-child/woocommerce/single-product/tabs/tabs.php , clear cache, and check now.
Regards
thank you. I will check and let you know if I find any weird behavior.
Have a nice day.
Greetings from Slovakia
Michal
You’re welcome! Have a nice day!
Regards
unfortunately there are still a lot of fatal errors resulting from the tabs.php snippet that you have added. Today I even had to login via recovery mode into my backend of the website.
can you please check?
Kind regards
Michal
Hello,
1/ Changing the title of tab works as it should ( https://prnt.sc/Uk2AJfsxSV2l -> https://prnt.sc/Gf5oj5aT62yx )
2/ Login to wp dashboard does not work -> https://prnt.sc/GQHX7ZafGYDj
3/ Previously we made changes in xstore-child/woocommerce/single-product/tabs/tabs.php to make positions of custom tabs changed (moved above others) – but we could not check because
3.1/ we cannot find product with custom tabs
3.2/ edit any product is not possible due to the limited access of admin user you provided.
Could you please, write what questions do you still have and provide link for product with custom tabs to check their positions (if the fix does not work still)?
Regards
Hi,
sorry. Now the geoblocking is temporarily disabled and you can log in.
As you can see in the error message in the PM area, there is a fatal error specifically refering to the tabs.php file that you have previously changed. Maybe there is just some small error in there
only thing that I have changed is to rename “additional information” to “specifications”. I have not yet played around with the order of the tabs since just the name change is showing fatal errors.
Editing of the products should be possible once you log into the admin
Hello,
Thanks for the reply.
Our developers team will be back at work after the weekend. Please be patient.
Where exactly do you see mentioned errors?
Provide URL of product with custom tabs.
Regards
Understood. no rush.
I see the fatal errors in the regular Woocommerce logs>
https://ibb.co/ZVDk2tB
Here is a product that has an additional custom tab added called “processing time”
https://www.density.sk/product/cerberus/
Screenshot here
https://ibb.co/Wzct1Bj
Hi
Not sure if you seen but I created a post with the easiest way to sort & rename tabs once they’re created here -> https://www.8theme.com/topic/fix-for-product-tabs-and-renaming-them-using-functions-and-css/
I’ve successfully added and renamed many tabs to the sites we look after using the functions as shown.
Good luck.
Hello,
Thanks for understanding, screenshots, and link
Regards
Hi there!
do you have an update for the current issue? I have noticed, that someone from your support staff has logged into my website and has deleted the error logs.
Should I consider this issue fixed?
Regards
Michal
Hello,
Yes, please, check now! We fixed php notices. We fixed first active tab (in case product has custom tab it is shown above all and it is active)
Regards
thank you very much. I appreciate it.
You’re welcome!
Regards
The issue related to '‘Change the default text/name of single product page tabs’' has been successfully resolved, and the topic is now closed for further responses