How to rename a Woocommerce page title programmatically?

In this tutorial we’ll learn how to rename a Woocommerce page title with code. Although we can change page title from backend but this tutorial is for those who don’t want to change the page title from backend. They want the page name to remain same on backend but display differently on front end.

This will be the default menu titles.

We’ll change the title of shop page in this tutorial. To do so add the following lines of code at the end of 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 "My new title";



Replace the title text with the text you want to replace and hit save.

Now go to front end and refresh the page. You’ll notice the page title has been changed.


Editorial Staff

ThemeLocation Provides Wordpress & Woocommerce development & Customization services. Have a Project? Contact To discuss

Leave a Reply

Your email address will not be published. Required fields are marked *