Pagination on page 2+ only

Question

So here is the code I have

<meta name="robots" content="follow, <?php echo (get_query_var('paged')==1)?'index':'noindex'?>" />

I am trying to have it set to only execute on pages 2 & above. Thus far I have tried

<meta name="robots" content="follow, <?php echo (get_query_var('paged')==2)?'index':'noindex'?>" />

But it’s still executing on page 1?

0
Robbert29 6 months 2022-02-10T05:08:30-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse