Shop page changes the page title in url

Posted in: Newspaper
Post count: 19

If I set page in Woo settings as store page then the page title changes automatically to “Shop”.
Page title and slug are “Ajakirjad” but the url displays Shop | Loodusajakiri.
The only thing that finally helped:
function wc_custom_shop_archive_title( $title ) {
if ( is_shop() ) { return str_replace( __( ‘Shop’, ‘woocommerce’ ), ‘Ajakirjad’, $title ); }
return $title;
}
add_filter( ‘wp_title’, ‘wc_custom_shop_archive_title’ );

Why do I have to use custom code?
https://www.loodusajakiri.ee/ajakirjad/

Post count: 21065

Hello!

Yes, because this is the way Woocommerce deals with those pages.

Thank you!

Post count: 19

No. I have several Woocommerce pages and nowhere else is the title “Shop” and “|” character on the url line.

Post count: 19

By Woocommerce pages, I mean ready-made online stores.

Post count: 27744

Hello,

To change the URL please check this guide https://njengah.com/change-woocommerce-shop-page-url/

Thank you!

Post count: 19

Yes, but unfortunately your theme changes this Woo’s normal behavior.
The problem is not in the url but in the title of the page.
“Shop” and character “|” in the title probably coming from your theme?

Post count: 21065

Hello!

No. Do you use any SEO plugins?
Please check the settings from your extra plugins too.

Thank you!

Post count: 19

I described the problem at first wrongly.
The problem is in the title of the page that is displayed in google search and on the browser tab.

Post count: 19

No SEO plugin.
Could you show me where in your theme’s code does this symbol and page title come from?

Post count: 21065

Hello!

Please contact us via email at contact@tagdiv.com and provide the following:
– admin url and credentials
– a link to this topic in order to identify you
I’ll help you!

Thank you!

Post count: 19

For now, title works with this custom code.
But it would be good to change it in the child theme?

Post count: 21065

Hello!

Yes. Or you can save the code and apply it after every update of the theme.

Thank you!

Post count: 19

Could you show me where in your theme’s code does this symbol and page title come from?

Post count: 21065

Hello!

The shop page is created by default by Woocommerce. If the page title has been changed, then this wasn’t caused by the theme.
Make a test and deactivate all plugins except tagDiv ones; if you are using a cache plugin, deactivate it, clear all cache, and try again. Check if the title has been changed or not and if a plugin caused this.

Thank you so much for understanding!

Post count: 19

So as I understand correctly the pages titles and symbol “|” are not coming from your theme?

Post count: 27744

Hi,

To remove the bar, you need to use a plugin for SEO and delete the separator from Seo title -> https://i.imgur.com/f691kMy.png -> https://stackoverflow.com/questions/65287575/how-to-remove-page-name-from-google-tab-bar-in-wordpress
Also, the shop appears for a default theme -> https://i.imgur.com/hE57Mwa.png

Thank you!

Viewing 16 posts - 1 through 16 (of 16 total)
The forum ‘Newspaper’ is closed to new topics and replies.