I have made a new WordPress Theme and I'm done .. but I have one problem. I can't get the pagination to work. I use the "wp-paginate" plugin and I have put the following code on my index.php:

<?php if(function_exists('wp_paginate')) {
} ?>

But that doesn't work for my site. There is still nothing on the frontend and in the markup. What can I do?

Here is my index.php:

    <?php get_header(); ?>

<div id="wraper">

<div id="main" role="main">


    <?php if ( ! have_posts() ) : ?>
            <h1>Nicht gefunden!</h1>

        <p>Sorry, leider konnte der gew&uuml;nschte Artikel nicht gefunden werden. Vielleicht hilft Ihnen die suche ja weiter!</p>
    <?php endif; ?>

    <?php while ( have_posts() ) : the_post(); ?>

        <?php get_template_part( 'loop-index', 'index' ); ?>

    </article><!-- post -->

    <?php endwhile; ?>

</div> <!-- end #wraper -->

<?php if(function_exists('wp_paginate')) {
} ?>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

1 Answer 1


If this is a new WordPress install, it is likely that you don't actually have enough posts to require pagination, and thus the pagination links aren't appearing.

Quick test: ensure you have at least two posts, then go to Dashboard -> Settings -> Reading, and change the "Posts Per Page" setting to 1. Do you see pagination links?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.