WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP-Paginate] With query-post doesn’t works :(

[Resolved] [Plugin: WP-Paginate] With query-post doesn’t works :(

  • Hi!…
    I’m working on a site with the category “blog” for posts that the editor can upload.

    The problem is that the wp-paginate only links on the first page… doesn’t works for the any other…

    Anybody knows a solution for this?.

    This is part of the code i’m using:

    <?php query_posts('posts_per_page=4&category_name=blog');
    
    if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    <h2><a href="<?php echo get_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <?php the_content('Leer el resto del art&iacute;culo'); ?>
    
    <?php endwhile; else: ?>
    
    <?php endif; ?>
    
    <?php if(function_exists('wp_paginate')) {
        wp_paginate();
    } ?>
    <?php wp_reset_query(); ?>

    Thanx!

    http://wordpress.org/extend/plugins/wp-paginate/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You need to include the page variable. Example:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("posts_per_page=4&category_name=blog&paged=$paged");

    Thanks emartin24!!!!!!
    😀

    any thoughts on where in the string that goes? after the query_posts(‘posts_per_page=4&category_name=blog’);
    or before the wp_paginate

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: WP-Paginate] With query-post doesn’t works :(’ is closed to new replies.