• Resolved dmag55

    (@dmag55)


    After adding add_theme_support(‘title-tag’); to my theme, the <head><title> tag on the shop page says “Products – [Site title]”, whereas I have the shop page called “Artworks” and have WooCommerce > Settings > Product > Shop page pointed to that “Artworks” page. There’s no word “Products” anywhere on that page, neither in title, nor slug.

    How do I change the <title> tag for the shop page?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @dmag55,

    With a basic installation of WordPress, WooCommerce and the default Storefront theme my Shop page title reflects the Site Title and the Tagline as shown under WP dashboard > General > General Settings:

    There are ways to change the Shop page title in WooCommerce and here’s an article that is describing how you can do it using a plugin or programmatically:

    https://njengah.com/woocommerce-change-shop-page-title/

    Hope this helps.

    Thread Starter dmag55

    (@dmag55)

    The article deals with page title of a shop page, my question is about title tag contained within the head tag in page’s html markup.

    After adding add_theme_support(‘title-tag’) to my functions.php, the title tag for my shop page becomes as follows:

    <title>Products - My Site Title</title>

    Whereas it’s supposed to be:

    <title>Artworks - My Site Title</title>

    Since the shop page in WP Dashboard > Pages is titled “Artworks”.

    The title tag is generated by add_theme_support(‘title-tag’) functionality, but for some reason it generates title “Products” instead of shop page’s actual title.

    Mirko P.

    (@rainfallnixfig)

    Hi @dmag55,

    You may want to review the Title Tag Codex documentation here:

    https://codex.www.ads-software.com/Title_Tag

    Since this is a theme feature and is a more development-oriented issue, I’ll go ahead and leave this thread open for a while in case anyone else wants to chime in, but in the meantime, I can also recommend the following resources for help:

    Cheers.

    Thread Starter dmag55

    (@dmag55)

    Thank you. The link you provided led me to document_title_parts filter, which is exactly what I was looking for.

    • This reply was modified 3 years, 1 month ago by dmag55.

    Thanks for letting us know, happy to know my colleague helped you out.

    If you have any further questions, I recommend creating a new thread since this now is already tagged as resolved.

    Thanks ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change title tag for shop page’ is closed to new replies.