Support » Plugins » [Plugin: WP-Paginate] Paginate won’t work on Archive Pg

  • Resolved kay1021


    I am hoping someone can help me because i am losing my mind. I’ve read all the instructions and i’ve search long and hard and i’ve tried everything and nothing will work.

    I can get the pagination to work on a page that has a query_posts I created. But what i really want it for is the archive page(i’m using the original archive page from the default theme), however it won’t show up if I just replace the next_post_link like it says to do.

    So i realized I didn’t even have a way to limit the number of posts per page…so i was searching for that and trying to incorporate the paged thing as well and finally the pagination shows up….but no matter what if i click any from 2 on…..i get the 404 page.

    this is what i changed the original code to look like…so that pagination does show up.

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    		  $temp = $wp_query;
    		  $wp_query= null;
    		  $wp_query = new WP_Query();
    		  $wp_query->query('posts_per_page=1&paged=' . $paged);
     while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    		<div <?php post_class() ?>>
    				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    				<small><?php the_time('l, F jS, Y') ?></small>
    				<div class="entry">
    					<?php the_content() ?>
    				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    		<?php endwhile; if(function_exists('wp_paginate')) {
    } ?>
    <?php $wp_query = null; $wp_query = $temp;?>

    Hope someone can help me…i’m going crazy!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Just use the plugin WP-PageNavi. By far the best plugin for pagination. You can even style everything in the plugin’s css file.

    I had tried all the different pagination plugins and just found out it was my own stupid fault that it wasn’t working.

    None of them would show the pagination just by replacing the next_post_entry etc like everyone was was driving me crazy…so i tried to play with the loop thinking i needed to limit the number of posts on the archive page.

    Some how I over looked the option in admin -> settings -> reading… of how many posts you wanted to show on a page (currently set to 10)_….and since i just started out…and was testing…i only had maybe 4 posts for a category…. so it wasn’t showing up because it wasn’t needed…i hadn’t reached 10+ posts

    So it works now…sucks i wasted time trying to figure it out..and that no where anyone had ever mentioned this option in the admin..but hopefully this will help anyone else who has a stupid moment! lol

    Thanks for the tip though

    I’ve the same problem.. Did you find something ?
    Best regards

    syndrael – what exactly is the problem you are having. kay1021 said that it wad caused by a setting and not having reached enough posts yet…

    I have faced this problem with WP-Paginate but I guess it was from the loop is self. See the correct loop below”
    <?php while (have_posts('category_name=Videos')):the_post(); ?>

    If you need any further help please do let me know.

    Eric Martin, as syndrael puts it, there seems to be a relation beetween the “Max number of posts to show on…” in the Reading options of Wp-admin and the plugin.

    Nevermind, the problem seem to be somewhere else

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Paginate] Paginate won’t work on Archive Pg’ is closed to new replies.