WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] pagination dont go to next page (5 posts)

  1. taghaboy
    Member
    Posted 3 years ago #

    i have two loop, and i'd like to paginat the results of 2end loop, why i dont work for me?

    <?php
    /*
    Template Name: Movie
    */
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<h2><?php the_title(); ?></h2>
    <?php endwhile; else : ?>
    <?php include (TEMPLATEPATH . "/page.nothingfound.php"); ?>
    <?php endif; ?>
    
    <?php query_posts('meta_key=categorie&meta_value=Movie');  ?>
    <?php while (have_posts()) : the_post(); ?>
    	<h2><?php the_title(); ?></h2>
    <?php endwhile; pagination(); ?>
  2. taghaboy
    Member
    Posted 3 years ago #

    any idea pls.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    you've got a query in there, queries require pagination to be included:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array(
    	'post_type' => 've_products', // custom post type
             'paged'=>$paged,
            ));
    ?>

    an example from my page with a query

  4. taghaboy
    Member
    Posted 3 years ago #

    thanks for the help

  5. taghaboy
    Member
    Posted 3 years ago #

    i post her the solution if any one have the some issu as me :

    <?php query_posts('category_name=xxx&showposts=xxx&paged='. $paged); ?>

    and now the pagination work fin in my page template where i loop posts.

    good luck

Topic Closed

This topic has been closed to new replies.

About this Topic