• Resolved chanhope

    (@chanhope)


    Product listing shop page default title is “Products” which we tried to change using editing the Page title but it’s not working.

    Tried creating a new page with a different title and assigned that page as the shop page, after assigning the page title will be turned to “Products”

    I have tried to change the title using the filter, still not working.

    add_filter( 'woocommerce_page_title', 'new_woocommerce_page_title');
      
    function new_woocommerce_page_title( $page_title ) {
      
      if( $page_title == 'Products' ) {
      
        return "New Shop Title";
      
      }
      
    }

    I was referring to the Meta title tag

    • This topic was modified 2 years, 2 months ago by chanhope.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter chanhope

    (@chanhope)

    Found out that this issue is happening with the default woo-commerce / WordPress installation.

    @chanhope

    To clarify what you mean, can you share a screenshot of the error via https://imgbb.com or https://snipboard.io?

    Thread Starter chanhope

    (@chanhope)

    Please find the screenshot here – https://snipboard.io/C1eDWc.jpg

    found similar issues with 2 other websites running the latest woo-commerce. so I created a new WordPress installation and tried a fresh woo-commerce installation.

    @chanhope

    I couldn’t reproduce this on my end.
    See this: https://snipboard.io/Orp9Q7.jpg

    To better understand the situation, Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.  Once you’ve done that, paste it here in your response.

    Thread Starter chanhope

    (@chanhope)

    I have checked in a few other woo-commerce installations, I can find a similar issue in all the woo-commerce installations I have on different servers.

    This is a fresh WordPress and woo-commerce installation –

    https://wc-ecommerce.dreamhosters.com/shop/

    ### WordPress Environment ###

    WordPress address (URL): https://wc-ecommerce.dreamhosters.com
    Site address (URL): https://wc-ecommerce.dreamhosters.com
    WC Version: 6.2.0
    REST API Version: ✔ 6.2.0
    WC Blocks Version: ✔ 6.7.3
    Action Scheduler Version: ✔ 3.4.0
    WC Admin Version: ✔ 3.1.0
    Log Directory Writable: ✔
    WP Version: 5.9
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: –

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 7.4.15
    PHP Post Max Size: 512 MB
    PHP Time Limit: 120
    PHP Max Input Vars: 1000
    cURL Version: 7.58.0
    OpenSSL/1.1.1

    SUHOSIN Installed: –
    MySQL Version: 8.0.28-0ubuntu0.20.04.3
    Max Upload Size: 512 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔

    ### Database ###

    WC Database Version: 6.2.0
    WC Database Prefix: wp_n4mpf6_
    Total Database Size: 4.33MB
    Database Data Size: 2.94MB
    Database Index Size: 1.39MB
    wp_n4mpf6_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_n4mpf6_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_n4mpf6_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_n4mpf6_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_n4mpf6_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    wp_n4mpf6_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_comments: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
    wp_n4mpf6_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_options: Data: 2.05MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_n4mpf6_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_n4mpf6_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    wp_n4mpf6_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_n4mpf6_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_n4mpf6_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_n4mpf6_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_n4mpf6_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_n4mpf6_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_n4mpf6_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_n4mpf6_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

    ### Post Type Counts ###

    attachment: 1
    page: 7
    post: 2
    revision: 1
    wp_global_styles: 1

    ### Security ###

    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔

    ### Active Plugins (2) ###

    DreamHost Panel Login: by DreamHost
    danielbachhuber – 1.0.0

    WooCommerce: by Automattic – 6.2.0

    ### Inactive Plugins (2) ###

    Akismet Anti-Spam: by Automattic – 4.2.2
    Hello Dolly: by Matt Mullenweg – 1.7.2

    ### Settings ###

    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)

    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)

    Connected to WooCommerce.com: –

    ### WC Pages ###

    Shop base: #6 – /shop/
    Cart: #7 – /cart/
    Checkout: #8 – /checkout/
    My account: #9 – /my-account/
    Terms and conditions: ❌ Page not set

    ### Theme ###

    Name: Twenty Twenty-Two
    Version: 1.0
    Author URL: https://wordpress.org/
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ✔

    ### Templates ###

    Overrides: –

    ### Action Scheduler ###

    Complete: 1
    Oldest: 2022-02-18 09:31:54 +0000
    Newest: 2022-02-18 09:31:54 +0000

    ### Status report information ###

    Generated at: 2022-02-19 19:14:26 +00:00
    `

    Hi @chanhope

    In this scenario, you can change the title by using a custom code, discussed here:

    https://stackoverflow.com/questions/36494520/changing-title-in-woocommerce-page/60097604#60097604

    Also, as mentioned in one of the replies there, you can use a plugin like YOAST SEO to do that too.

    Let us know how it goes! Thank you!

    Thread Starter chanhope

    (@chanhope)

    Yes, I found out that we can change the title using the Yoast plugin, but still is it some kind of bug in WooCommerce?

    WooComerce suppose to use the page title instead of “Products”

    Thread Starter chanhope

    (@chanhope)

    in between, I tried with all those codes in the stack and none of them worked for me.

    Hi @chanhope

    I tested the following code on one of my test sites and it worked for me:

    function wp_head_wpaction0() {
        if ( is_shop() ) { ?>
            <title>Custom title</title>
        <?php }
    }
    add_action( 'wp_head', 'wp_head_wpaction0', 0 );

    IMAGE
    Link to image: https://snipboard.io/JC1VLo.jpg

    As you have already noticed, changing the page title in the settings just changes the heading and the menu item:

    IMAGE
    Link to image: https://snipboard.io/iKOC4c.jpg

    So please go ahead and add this code.

    Cheers

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, the above info was helpful.

    If you have further questions, please feel free to open a new topic.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not able to change the shop page title “Products”’ is closed to new replies.