Title: WP-Paginate coding
Last modified: August 19, 2016

---

# WP-Paginate coding

 *  [losched16](https://wordpress.org/support/users/losched16/)
 * (@losched16)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/wp-paginate-coding/)
 * I have a Question and Answer site and I just added the WP-Paginate plugin to 
   my site. I also must note that I have very limited coding knowledge.
 * When I put the code into my main template (I want the paginate function to be
   displayed below the “Recent Questions” title and above the first posted questions),
   the pages show up on the same line as the first post and pushes the title to 
   the right, rather than on a new line. Here is my index.php code (just the portion
   with the paginate function). Please advise on how I can edit the code to get 
   the title, pages, and posts on 3 separate lines. Thank you
 * ?php get_header(); ?>
    <?php if (have_posts()) : ?>
 * <div id=”left”>
    <?php if (have_posts()) : ?>
 *  <h2 class=”recent”>Recent Questions</h2>
 * **<?php if(function_exists(‘wp_paginate’)) {
    wp_paginate(); } ?>  <?php while(
   have_posts()) : the_post(); ?>
 * <div class=”entry”>
    <div class=”commentcount”>” class=”commentno”><?php comments_number(‘
   0′,’1′,’%’); ?>
   <p>Answers</p></div>

Viewing 1 replies (of 1 total)

 *  [Eric](https://wordpress.org/support/users/emartin24/)
 * (@emartin24)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/wp-paginate-coding/#post-1654791)
 * You need a div or something to “contain” the pagination output.
 * You can either update the Advanced Settings and add some Before and After Markup
   or put some markup directly in your template.
 * For example:
 *     ```
       <div class="nav">
       <?php if(function_exists('wp_paginate')) {
       wp_paginate();
       } ?>
       </div>
       ```
   
 * -Eric

Viewing 1 replies (of 1 total)

The topic ‘WP-Paginate coding’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Eric](https://wordpress.org/support/users/emartin24/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/wp-paginate-coding/#post-1654791)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
