• I’ve been trying to get some pagination links (next, previous, etc.) onto my pages (not the posts) but have had no luck. I would like to keep from using a plugin if possible. I’ve tried using wp_link_pages() by putting it in a page template file but that didn’t work. Putting the function in a functions.php file didn’t work either. Here’s my code.

    <?php
    /*
    Template Name: Multiedit Page
    MultiEdit:Right,Bottom,Left
    */
    
        // calling the header.php
        get_header();
    
        // action hook for placing content above #container
        thematic_abovecontainer();
    ?>
    
    		<div id="container">
    
    			<?php
    				// action hook for placing content above #content
    				thematic_abovecontent();
    
    				// filter for manipulating the element that wraps the content
    				echo apply_filters( 'thematic_open_id_content', '<div id="content">' . "\n" );
    
    				// calling the widget area 'page-top'
    	            get_sidebar('page-top');
    
    	            // start the loop
    	            while ( have_posts() ) : the_post();
    
    				// action hook for placing content above #post
    	            thematic_abovepost();
    	        ?>
    
    				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?> > 
    
    				<?php
    
    	                // creating the post header
    	                thematic_postheader();
    				?>
    
    					<div class="entry-content">
    
    						<?php
    	                    	the_content();
    
    	                    	wp_link_pages( "\t\t\t\t\t<div class='page-link'>" . __( 'Pages: ', 'thematic' ), "</div>\n", 'number' );
    
    	                    	edit_post_link( __( 'Edit', 'thematic' ), "\n\t\t\t\t\t\t" . '<span class="edit-link">' , '</span>' . "\n" );
    	                    ?>
    
    					</div><!-- .entry-content -->
    
    				</div><!-- #post -->
    
    			<?php
    				// action hook for inserting content below #post
    	        	thematic_belowpost();
    
           			// action hook for calling the comments_template
           			thematic_comments_template();
    
    	        	// end loop
            		endwhile;
    
    	        	// calling the widget area 'page-bottom'
    	        	get_sidebar( 'page-bottom' );
    	        ?>
                <div id="lefttside">
                	<?php multieditDisplay('Left'); ?>
                    </div>
    			<div id="rightside">
                	<h3>Ingredients</h3>
                	<?php multieditDisplay('Right'); ?>
                    </div>
    			</div><!-- #content -->
    
    			<?php
    				// action hook for placing content below #content
    				thematic_belowcontent(); 
    
    			?>
    			<div id="bottomside">
                	<h3>Notes</h3>
                	<?php multieditDisplay('Bottom'); ?>
                    </div>
    		</div><!-- #container -->
    
    <?php
        // action hook for placing content below #container
        thematic_belowcontainer();
    
        // calling the standard sidebar
        thematic_sidebar();
    
        // calling footer.php
        get_footer();
    ?>
Viewing 1 replies (of 1 total)
  • The wp_link_pages() function is used to break a single Page into multiple screens. You indicate the page breaks by inserting the <!--nextpage--> quicktag into the text where you want the breaks.

    If you are trying to paginate multiple Pages instead of breaking a single Page into multiple screens, you probably want to use the previous or next_posts_link() function.

Viewing 1 replies (of 1 total)
  • The topic ‘Paginating pages not posts’ is closed to new replies.