Bricks Version: 1.5.3
Browser: Chrome
OS: Windows
Woocommerce shop page title
Hi, when creating the shop page, the academy mentions you can use a template or edit the page itself. Now I’ve tried both, set the titles in Bricks itself, via SEO Press, the social cards. But no matter what I do the page title in the browser remains as “products - site title”.
Also, updating the title in the Bricks SEO settings makes it reload the page and empties the title field. (Tried that 4 times).
I’ve inspected the page, and the Meta OG:title displays correct. Just not in the browser.
I ended up removing the template, and editing the shoppage directly (copied the template content since the shop is build with a custom loop anyway). Same result.
So, went in SEOPress and set the ‘archive products’ to %%post title%% - %%sep%% - %%site title%%. But then only the separator + site title gets pulled in. It almost seems like the post title isn’t pulling through.
So for now I simply put in the title in the SEO Press setting → archive → products, and set the “posttype → products” to %%post_title%% %%sep%% %%site_title%%.
This now works for both the shop page as the category pages.
Still might be something to look into.
On the rankmath site I found a php snippet which could be added to the functions.php file.
/**
* Filter to Change WooCommerce Page Title.
*/
add_filter( 'woocommerce_page_title', 'new_woocommerce_page_title' );
function new_woocommerce_page_title( $page_title ) {
if ( $page_title == 'Shop' ) {
return 'New Shop Title'; // Add your title here.
}
}
In the above code snippet, make sure to replace ‘New Shop Title’ with your own shop page title.
You may now see your new title in action by going to your online store page. You’ll notice that this method changes the title on the page, not the shop page URL or WooCommerce breadcrumbs.
So that is still ‘hardcoding’ it in, just in the php file this time.
For me it’s solved for now. But it should be looked at I guess.