Thread Starter
Anonymous User 9948090
(@anonymized-9948090)
Just to add more details! I added the code manually in header.php file to set noindex for index paged pages such as homepage.com/page/2, etc. Now its also applying to category paged pages.
So basically I want to set the noindex only for Index paged pages and not for category paged pages.
Thread Starter
Anonymous User 9948090
(@anonymized-9948090)
Ok. I found the solution myself. Using following now:
<?php if ( is_paged() && is_front_page() ) { ?>
<meta name="robots" content="noindex,follow" />
<?php } ?>
<?php if ( is_search() ) { ?>
<meta name="robots" content="noindex,follow" />
<?php } ?>
So now noindex is set to only those paged pages which are part of homepage. So its not applying to category paged pages and no more duplicate noindex meta tag. 🙂
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]