This topic has 6 replies, 2 voices, and was last updated 6 years ago ago by Rose Tyler
Hi!
I added a custom tab to my single product page.
This custum tab shows after the Reviews tab (valoraciones): https://prnt.sc/lco8a2
How can I put the Reviews tab at the end?
I tried with this snippet, but I don’t know the name or the priority of my custom tab:
/**
* 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;
}
Thanks!
Hello,
Please read this article https://docs.woocommerce.com/document/editing-product-data-tabs/
Feel free to ask if you have any other questions.
Regards
Hi,
I read that article and I took the “Re-ordering Tabs” snippet:
/**
* 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;
}
The problem is that I don’t know the name of the custom tab that I did in “Theme Options > Single Product Page > Tabs Settings”
Hello,
Please provide us with your site URL.
Regards
Here you have
Please try to add this code in Theme options > Custom css:
.tabs {
display: flex;
flex-direction: column;
}
.tabs .tab-reviews {
order: 2;
}
.tabs .tab-description + .accordion-title {
order: 1;
}
Regards
You must be logged in to reply to this topic.Log in/Sign up