Support » Fixing WordPress » how to: show page number on homepage

  • How do you (what is the code) show the page number on the homepage? So if you are on page two, scrolling through posts, I want to make it say “page 2”, and so on?

Viewing 1 replies (of 1 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    try:

    <?php echo get_query_var('paged'); ?>

    or more refined:

    <?php echo 'page '.(get_query_var('paged') ? get_query_var('paged') : '1'); ?>

    or to show only on page 2 +:

    <?php echo (get_query_var('paged') ? 'page'.get_query_var('paged') : ''); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘how to: show page number on homepage’ is closed to new replies.