I've seen loads of example of how to re-order / change the navigation and page with the WooCommerce my account dashboard. But i can't for the life of me work out how to change the main titles for each section (My Account, Orders, Downloads, Addresses etc).
I've searched through the templates but no joy. I've tried using conditional php comments to echo the titles for the correct page. But it doesn't work because my account section uses endpoints. I've tried adding a filter, but no joy. Anyone got any idea how i change these titles?
Thanks
The easiest way to change the WooCommerce shop page title is by using the built-in WordPress settings. To do so, navigate to Pages > All Pages from your WordPress dashboard. Find the 'Shop – Shop Page' and click the Edit button. You can then change your shop page title as shown below.
To modify the title tag of your index page, log in to the WordPress admin area and go to Settings > General. On this page, edit the Site Title field and save the changes. By default WordPress doesn't allow you to have a custom title for each post or page you create – just for your home page.
It can be done using the composite filter hook woocommerce_endpoint_{$endpoint}_title
.
For example if you need to change the My Account "** Account details**" title you will use (where the endpoint is edit-account
):
add_filter( 'woocommerce_endpoint_edit-account_title', 'change_my_account_edit_account_title', 10, 2 );
function change_my_account_edit_account_title( $title, $endpoint ) {
$title = __( "Edit your account details", "woocommerce" );
return $title;
}
Code goes in function.php file of your active child theme (or active theme). Tested and works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With