filmov
tv
How to Change Product Tab Titles and Headings in WooCommerce WordPress
Показать описание
In this woocommerce tutorial for beginners you will learn how to rename or edit products tabs title & heading e.g description, additional information and reviews using custom php code in wordpress website.
Use following custom snippet:
add_filter( 'woocommerce_product_description_heading', 'wtwh_rename_description_tab_heading' );
function wtwh_rename_description_tab_heading() {
return 'Description Heading';
}
add_filter( 'woocommerce_product_description_tab_title', 'wtwh_rename_description_tab' );
function wtwh_rename_description_tab( $title ) {
$title = 'Description Title';
return $title;
}
add_filter( 'woocommerce_product_additional_information_tab_title', 'wtwh_rename_additional_info_tab' );
function wtwh_rename_additional_info_tab( $title ) {
$title = 'Additional Information Title';
return $title;
}
add_filter( 'woocommerce_product_additional_information_heading', 'wtwh_additional_info_heading' );
function wtwh_additional_info_heading( $heading ){
return 'Additional Information Heading';
}
add_filter( 'woocommerce_product_reviews_tab_title', 'wtwh_rename_reviews_tab' );
function wtwh_rename_reviews_tab( $title ) {
$title = str_replace( 'Reviews', 'What customers are saying', $title );
return $title;
}
add_filter( 'woocommerce_reviews_title', 'wtwh_reviews_heading', 10, 3 );
function wtwh_reviews_heading( $heading, $count, $product ){
return 'What customers think about this product';
}
* you can add your text in code.
#woocommerce #tabs #product #products #wpcode #wordpress #wordpresstutorial #webtaskwithhassan #hassangilani
Use following custom snippet:
add_filter( 'woocommerce_product_description_heading', 'wtwh_rename_description_tab_heading' );
function wtwh_rename_description_tab_heading() {
return 'Description Heading';
}
add_filter( 'woocommerce_product_description_tab_title', 'wtwh_rename_description_tab' );
function wtwh_rename_description_tab( $title ) {
$title = 'Description Title';
return $title;
}
add_filter( 'woocommerce_product_additional_information_tab_title', 'wtwh_rename_additional_info_tab' );
function wtwh_rename_additional_info_tab( $title ) {
$title = 'Additional Information Title';
return $title;
}
add_filter( 'woocommerce_product_additional_information_heading', 'wtwh_additional_info_heading' );
function wtwh_additional_info_heading( $heading ){
return 'Additional Information Heading';
}
add_filter( 'woocommerce_product_reviews_tab_title', 'wtwh_rename_reviews_tab' );
function wtwh_rename_reviews_tab( $title ) {
$title = str_replace( 'Reviews', 'What customers are saying', $title );
return $title;
}
add_filter( 'woocommerce_reviews_title', 'wtwh_reviews_heading', 10, 3 );
function wtwh_reviews_heading( $heading, $count, $product ){
return 'What customers think about this product';
}
* you can add your text in code.
#woocommerce #tabs #product #products #wpcode #wordpress #wordpresstutorial #webtaskwithhassan #hassangilani
Комментарии