How To Add Woocommerce Attribute Label In Archive Meta Title?
-
If i visit url like /color/red
Meta title in tab is:- Red | SitenameI want this in archive meta title:- Product: Red | Sitename.
How can i add this?
-
This topic was modified 2 years, 11 months ago by
networkwebmasters.
-
This topic was modified 2 years, 11 months ago by
-
I want this in archive meta title:- Product Color: Red | Sitename.
I hope you’re well today!
Please go to the
SmartCrawl -> Ttitle & Meta -> Arhives
page and you should see “Products” archives options there (assuming that you are using WooCommerce or similar plugin that registered “product” custom post type).
You can set the default title structure there.
Here’s more information (See “Arhives” section and “Settings (Title & Meta)” section right below it):
https://wpmudev.com/docs/wpmu-dev-plugins/smartcrawl/#archives
Kind regards,
AdamTried these steps many times, these steps not working, but i tested other seo plugins and that plugins are working properly.
I am using WooCommerce plugin.
Could you let us know the theme that you are using?
I tested using the default WordPress theme > Added a custom colour attribute then the text in the meta settings:
https://monosnap.com/file/ytzPTDl8lLTZXsbxp8XXETfH6dLvty
It worked well:
https://monosnap.com/file/4lPSDZZ6qIUA0xBsEmW9oWXA1JAMYH
Let us know the result you got.
Best Regards
Patrick FreitasSuperb, you did it successfully by adding manually “Product Color:” in meta title.
https://monosnap.com/file/ytzPTDl8lLTZXsbxp8XXETfH6dLvtyI was trying macros in meta title.
The issue is resolved now.Check this plugin; it uses “%_tax_name_%” macro.
https://wordpress.org/plugins/seo-simple-pack/Thank you so much,
You are awesome 🙂I see now what you mean and it makes sense yes, we will have the term name macro that will get the “Red” colour, but we don’t have the taxonomy macro, not dynamically, but I sent the suggestion to our developers, I hope we can improve it in the future.
Best Reards
Patrick FreitasI can confirm we have already raised this to our team’s attention as a feature request. Since you don’t have any further queries related to this topic. I’ll mark this thread as resolved for now.
Please feel free to re-open the thread if you need further assistance.
Best Regards
NithinPlease provide function for “%_tax_name_%” macro.
We don’t have any “custom function” for that. As my colleague already said: we have already reported this to our developers. It’s a feature request and it’s not on the “to do” list to be implemented in plugin with one of future releases but I don’t have an ETA.
Kind regards,
AdamThis means smartcrawl is not a complete seo plugin like other plugins. I think after your above answer this is the time remove this plugin and install yoast seo plugin again.
@wpmudev-support8 Please read your reply again its little bit confusing.
It’s not on the “to do” list or it’s on the “to do” list?
Sorry for the typo, Adam meant “it’s on the to do list”. I have checked and confirmed we already have a feature task for the same in our backlogs.
Kind Regards,
Nebu JohnCan you provide function for this?
Unfortunately we don’t have the full code for this as it requires deeper development, in case you are looking for archive pages you can give a try on:
<?php add_action( 'wds-known_macros', function( $replacements ){ if( is_archive() ){ // Replace the macro on archive pages, extend this conditional if you wish to do on other pages. $tax = get_queried_object(); $tax = get_taxonomy( $tax->taxonomy ); $replacements['%%sc_tax_name%%'] = $tax->labels->singular_name; } return $replacements; } );
Then use the %%sc_tax_name%%, it won’t be visible in backend but from my test worked fine in frontend archive page https://monosnap.com/file/4qwRQO9Ne49WFvVNG8GHMtfDOWdBPr
Note, extending this code is out of our support scope, but it gives a starter code for you or your developer.
Best Regards
Patrick Freitas
- The topic ‘How To Add Woocommerce Attribute Label In Archive Meta Title?’ is closed to new replies.