• Below are the plugin instructions which are supposed to provide page numbers for my blog. I have the plugin uploaded and activated on my blog already. However, it is not appearing as it should on my blog: Only the words “Older” and “Newer” appear at the bottom. But, there should also be numbers accompanying the words. I want these to show up to make navigation easier.

    I guess this is where I get confused…Do I take the code provided in the instructions and place it somewhere in my archive.php ? I attached the last part of my archive.php.
    Would someone be willing to tell me where on my archive.php I’m supposed to switch and put the code.? I’d really appreciate the help.

    == Installation ==

    1. Upload the FOLDER ‘wp-page-numbers’ to the /wp-content/plugins/
    2. Activate the plugin ‘WP Page Numbers’ through the ‘Plugins’ menu in admin
    3. Go to ‘Options’ or ‘Settings’ and then ‘WP Page Numbers’ to change the options

    = Usage =

    Replace the the ‘next_posts_link()’ and ‘previous_posts_link()’ with the code below in your theme (archive.php, index.php or search.php).

    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>


    My archive.php below:

    ———————————————————————–
    <div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>
    </div>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi comment out the existing code in archive.php like this:

    <!-- <div class="alignleft"><?php // next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php // previous_posts_link('Newer Entries »') ?></div>
    </div>-->

    and under that, paste this in:
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>

    I’m not familiar with that plugin but that is what the instructions are telling you to do to get it working.

    Thread Starter pglynn

    (@pglynn)

    This is now how it looks after following your instruction. But the numbers still don’t show up. Can you tell what I did wrong?

    <div class=”navigation”>
    <!– <div class=”alignleft”><?php // next_posts_link(‘« Older Entries’) ?></div>
    <div class=”alignright”><?php // previous_posts_link(‘Newer Entries »’) ?></div>
    </div>–>

    <?php if(function_exists(‘wp_page_numbers’)) { wp_page_numbers(); } ?>
    </div>

    <?php else : ?>

    1) what is the
    <?php else : ?>

    that wasn’t in the code i sent you

    2) i am assuming you already followed the instruction to

    3. Go to ‘Options’ or ‘Settings’ and then ‘WP Page Numbers’ to change the options

    Thread Starter pglynn

    (@pglynn)

    <?php else : ?>
    is the part that I left out of my archive.php. This is what the whole archive looks like at the bottom:
    one last thing, when I go to settings then page numbers….do I unclick the something. Sorry, I keep asking so many question, it just that I have no clue about this html/wordpress stuff and I have no one to call to help me. Your help is much appreciated!
    ——————————————————————–

    <?php endwhile; ?>

    <div class=”navigation”>
    <!– <div class=”alignleft”><?php if(function_exists(‘wp_page_numbers’)) { wp_page_numbers(); } ?>) ?></div>
    <div class=”alignright”><?php if(function_exists(‘wp_page_numbers’)) { wp_page_numbers(); } ?>) ?></div>
    </div>–>
    <?php if(function_exists(‘wp_page_numbers’)) { wp_page_numbers(); } ?>

    </div>

    <?php else : ?>

    <h2 class=”center”>Not Found</h2>
    <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>

    Hi

    I’d not used that plugin before. I installed it on a test site using the default theme. I added in the line of code and commented out the existing navigation as I explained earlier. And it worked just fine the first time.

    The first thought is, are you trying to display this on your main posts page? Then you’d want to add the plugin’s line of code to index.php – you have been adding it to archive.php which is used for older posts and in some themes for category pages. But the main post page uses index.php. Give that a try

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘page numbers’ is closed to new replies.