WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP Page Numbers] How to check current page number?

[Plugin: WP Page Numbers] How to check current page number?

  • rizkysyazuli
    Member

    @rizkysyazuli

    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/

  • The topic ‘[Plugin: WP Page Numbers] How to check current page number?’ is closed to new replies.