Hello! I had such a problem: When you go to the store page, catalogs open and magic happens. The name of the page is set to "store" and in the header title is the name of the last product. It also happens in the category pages. Judging by everything, it just takes the title not from the title-page but from somewhere else, the hooks by changing the title on the store pages are only removed in the h1 title. SEO plugins are also powerless. On all other pages except the store, everything is well derived from the title of the page. How can this be fixed?
2 answers
Judging by the description of your loop got inside another loop. Or forgot wp_reset_query() . Disable ALL plugins. Check it out. Then turn on one at a time, while checking whether the title does not break. If it's not about plugins, activate the default theme of the storefront merchant or the default theme of WordPress itself. If everything is smooth with them, look for the tramp in your code.
|
It turned out you had to use for title <?php wp_title(''); ?> <?php wp_title(''); ?> and not get_the_title( $post );
|