• 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)
  • 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.