WordPress.org

Ready to get started?Download WordPress

Forums

WP Page Numbers
How to check current page number? (1 post)

  1. rizkysyazuli
    Member
    Posted 3 years ago #

    how do i do check which page i'm currently on? is there a variable stored by WP Page Numbers that i can use?

    here's my case: i have an introduction content that is showed on the front page. but once users click to the next page, this content should not be visible.

    here's a snippet from my index template:

    ...
    <?php if (is_front_page()) : ?>
      // the intro. this should only show up on the first page
    <?php endif; ?>
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
      // the loop
    <?php endwhile; ?>
    <?php endif; ?>
    ...
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>

    and while we're on the subject.. how do i add the current page numbers to the title tag?

    thx

    http://wordpress.org/extend/plugins/wp-page-numbers/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic