WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] How do I rename the Shop page? (9 posts)

  1. LordLiverpool
    Member
    Posted 1 year ago #

    Hello

    I want to rename the shop page to something else e.g. Store

    Can anyone tell me how to do this?

    Thanks in advance

    https://wordpress.org/plugins/woocommerce/

  2. terrytsang
    Member
    Posted 1 year ago #

    Hi @LordLiverpool, you can add below code into your theme functions.php:

    add_filter( 'woocommerce_page_title', 'woo_shop_page_title');
    
    function woo_shop_page_title( $page_title ) {
    
    	if( $page_title == 'Shop' ) {
    		return "New Title";
    	}
    }
  3. LordLiverpool
    Member
    Posted 1 year ago #

    Hi @terrytsang

    I added you code to my child theme's functions.php

    add_filter( 'woocommerce_page_title', 'woo_shop_page_title');
    
    function woo_shop_page_title( $page_title ) {
    
    	if( $page_title == 'Shop' ) {
    		return "Booth Packages";
    	}
    }

    Nothing changed

    I was expecting the menu item, bread crumb, page title, url etc to all change. none of them did.

    Any ideas?

    Thank you

  4. lorro
    Member
    Posted 1 year ago #

    Hi, On my setup its enough to find the page in the page list, edit its title and republish.

  5. LordLiverpool
    Member
    Posted 1 year ago #

    @lorro

    I tried that, but when I click on the renamed menu item I just get a blank page. If I change the name back to "shop" then the shop page reappears.

  6. lorro
    Member
    Posted 1 year ago #

    @LordLiverpool,
    Definately works for me. Maybe you need to go to Appearance / Menus, delete the old menu item and replace it with the new one. My theme does that part automatically but maybe your works differently.

  7. LordLiverpool
    Member
    Posted 1 year ago #

    @lorro

    I just tried that. I renamed "shop" to "reservations".

    I deleted my menu, created a new menu and then added the pages back including the new "reservations" page.

    Sure enough the menu item is changed but when I click on "reservations" I just get a blank page.

    When I edit the shop/reservations page its empty. Did there use to be a WooCommerce shortcode for the shop page?

    WordPress: 3.8.3
    WooCommerce: 2.1.7
    Theme: Enfold 2.5

    Cheers

  8. lorro
    Member
    Posted 1 year ago #

    Hi, There is no WooCommerce shortcode on the Shop page. WooCommerce should know where the shop page is by means of the setting at WooCommerce Settings / Products tab / "Product Archive / Shop Page": set the dropdown to the "reservations" page. If that still doesn't work, and this is a bit desperate, start over by deleting the shop page and use the button at WooCommerce / System Status / Tools tab / Install WooCommerce Pages, then rename the page. I should remove the non-working code snippet you put in in functions.php while you're trying this method.

  9. LordLiverpool
    Member
    Posted 1 year ago #

    @lorro

    BINGO!!!

    1. Deleted the code snippet from functions.php.
    2. Renamed "shop" to "reservations".
    3. Also changed its permalink to reservations.
    4. clicked update on the page.

    Now the funny thing is "shop" was changed to "reservations" but I kept getting a blank page until like you said and I went to WooCommerce > Settings > Products Tab AND clicked the "Save changes" button at the foot of the page.

    I think this was the crucial part, although the name had changed on the combo box it wasn't until I clicked the "Save Changes" button that the name of the shop page changed within the WooCommerce code.

    @lorro Thank you very much, its nice to get help around here, its very rare, cheers!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic