i want it to be I want to replace the top Store page name on the wordpress product page with the product name, can anyone help?
example: i want it to be How can I do? There is no such setting in the properties of the theme?
CodePudding user response:
Not knowing what theme you are using or how the Shop title is being generated, try adding this code to your functions.php file
add_filter( 'woocommerce_page_title', 'woo_shop_page_title');
function woo_shop_page_title( $page_title ) {
if( 'Shop' == $page_title) {
return the_title();
}
}
This code replaces the page title Shop with the title of the product (post).
CodePudding user response:
Uncaught Error: Call to undefined function woo_shop_page_title() in C:\wamp64\www\artyge\wp-content\themes\retbo\inc\template-helper.php:1570
I'm looking from phpstorm giving this error. and the page title does not change unfortunately :/ :(