I use a set of conditionals to define metatags on the various parts of my site. I noted that all pagination pages use the same metatags. If I can use a conditional tag or work around to identify the page number then I can use this to define unique metatags for each page of pagination.


1 Answer 1


You can use

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

to get current page number

  • My usage will be in a switch: switch ($paged){case 1: do something; break;case 2: do something else; break;default: something else; break;} Should your code for $paged work for returning case 1-25 or whatever? Dec 19, 2017 at 6:36
  • I will test it and let you know. Dec 19, 2017 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.