Dears,
We would like to add the a noindex meta robots tag in the <header> of the ‘Portfolio entry’ template: <meta name=”robots” content=”noindex”>
These pages are automatically generated by the theme (eg. https://sinoptix.eu/portfolio_entries/lenses/ – full list here https://sinoptix.eu/portfolio_entries-sitemap.xml)
But we created dedicated pages: https://sinoptix.eu/optical-components/lenses-supplier/
=> How can we add a noindex meta robots tag to all the ‘portfolio entries’ pages?
Thank you
Boris
Hey Baobufan,
Thank you for the inquiry.
The solution that we provided in the following thread should help.
// https://kriesi.at/support/topic/set-no-index-to-portfolio-items/#post-1203180
Best regards,
Ismael
Dear Ismael,
Thank you for your quick answer, but if I understand it well the post is about not indexing all the portfolio items, while our request is to not indexing the “portfolio_entries” pages only. We want to keep indexing the portfolio items but not the automatically generated portfolio_entries pages.
For example : portfolio item we want to keep indexing : https://sinoptix.eu/portfolio-item/znse-lens/
Portfolio entries we want to stop indexing: https://sinoptix.eu/portfolio_entries/lenses/
Kind Regards,
Boris
Hi,
Thank you for the clarification.
You can replace is_single with the is_tax conditional function to add the meta tags on portfolio category pages instead.
// https://developer.wordpress.org/reference/functions/is_tax/
Best regards,
Ismael