SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with WordPress Page Numbers Plugin

    Hey, i know you guys dont deal with wordpress probably but maybe you can help me.

    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 it possible for a site to have something like this at the botton:



    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.
    Code:
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>
    "



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

    So, Here is the index.php to my site

    Code:
    <?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(); ?>
    link to the Plugin homepage: http://www.jenst.se/2008/03/29/wp-page-numbers/
    Any thoughts on how to do it?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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>
    Probably you want to replace this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •