Help with WordPress Page Numbers Plugin

Discussion in 'HTML & Website Design' started by Skwerl, Dec 17, 2009.

  1. #1
    I'm trying to add this plugin to my sites

    This WP Page Numbers Plugin is an alternative to the ”Next page” and ”Previous page” thing at the botton to navigate a page.

    The plugin makes the it post for a site to have something like this at the botton:

    [​IMG]

    Now, i have already installed the plugin but am having a little trouble with the instructions. After installing the instructions are:

    "1. Replace the the ‘next_posts_link()’ and ‘previous_posts_link()’ with the code below in theme (archive.php, index.php or search.php). If you can’t find it, place it between endwhile; and endif; in your theme.

    2.
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>
    Code (markup):
    "



    Now that's the part i dont get. I have tried to no avail.

    So, Here is the index.php to my site

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    
    
    	<?php if (have_posts()) : ?>
    
    
    
    		<?php while (have_posts()) : the_post(); ?>
    
    
    
    			<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    
                	<div class="left">
    
                    	<div class="thumb" style="background: url(<?php bloginfo('url'); ?>/<?php echo get_post_meta(get_the_ID(), '_video_thumbnail_small',true)?>) no-repeat 50% 50%;" alt="<?php the_title_attribute('echo=1'); ?>">
    
                            <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute('echo=1'); ?>"><div></div></a>             
    
      					</div>
    
                        <div style="display:inline;">
    
                        	<span class="left watch-btn"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute('echo=1'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/watch-btn.gif" alt="watch" /></a></span>
    
                            <span class="left ratings"><?php if(function_exists('the_ratings')) { the_ratings(); } ?></span>
    
                        </div>
    
                    </div>
    
    				<div class="right">
    
                    	<div class="part1">
    
                    	<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute('echo=1'); ?>"><?php the_title(); ?></a></h2>
    
                        <div class="entry"><?php the_excerpt(''); ?></div>
    
                        </div>
    
                        <div class="read-more"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute('echo=1'); ?>">read more...</a></div>
    
                        <div class="postmetadata"><?php comments_popup_link('No Comments', '1 Comment', '% Comments', '', 'Comments Closed' ); ?> | Category: <?php echo get_the_category_list(', ');?></div>
    
                    </div>
    
    			</div>
    
    
    
    		<?php endwhile; ?>
    
    
    
    		<div class="navigation">      
    
            <div class="alignleft"><?php previous_posts_link('<div class="pre"></div>') ?></div>    
    
    			<?php if(function_exists('wp_pagenavi')){ wp_pagenavi(); } else { ?>	
    
                <?php } ?>
    
            <div class="alignright"><?php next_posts_link('<div class="next"></div>') ?></div>
    
    		</div>
    
    
    
    	<?php else : ?>
    
    
    
    		<h2 class="center">Not Found</h2>
    
    		<p class="center">Sorry, but you are looking for something that isn’t here.</p>
    
    
    
    	<?php endif; ?>
    
    
    
    	</div>
    
    
    
    <?php get_sidebar(); ?>
    
    
    
    <?php get_footer(); ?>
    
    Code (markup):
    link to the Plugin homepage: http://www.jenst.se/2008/03/29/wp-page-numbers/
    Any thoughts on how to do it?
     
    Last edited: Dec 17, 2009
    Skwerl, Dec 17, 2009 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    I think you have to replace this code
    
             <div class="alignleft"><?php previous_posts_link('<div class="pre"></div>') ?></div>
    
    			<?php if(function_exists('wp_pagenavi')){ wp_pagenavi(); } else { ?>
    
                <?php } ?>
    
            <div class="alignright"><?php next_posts_link('<div class="next"></div>') ?></div>
    
    Code (markup):
    to
    
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>
    
    Code (markup):
    But it will be better for me to view the website.
     
    s_ruben, Dec 17, 2009 IP