Support » Themes and Templates » custom post_type list pagination

  • Hi there,

    Trying hard to paginate a list of a certain custom post type, but I cannot get any of the examples to function right. The first page is shown, and also the link to the second page, but when clicked on the result is “not found”. Here is the code I use:

    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query( array(
    ‘post_type’ => ‘vacatures’,
    ‘posts_per_page’ => 100,
    ‘orderby’=> ‘ASC’,
    ‘paged’=>$paged ,
    ) ); ?>

    <table id=”vacaturelijst” width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
    <th scope=”col”>Titel/Omschrijving</th>
    <th scope=”col”>Functie</th>
    <th scope=”col”>Plaats</th>
    <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    <tr class=”row”>
    <?php the_title( ‘<td width=”309″>‘, ‘</td>’ ); ?>
    <td width=”155″>“><?php echo get_post_meta($post->ID, ‘functie’, true); ?></td>
    <td width=”155″>“><?php echo get_post_meta($post->ID, ‘plaats’, true); ?></td>
    <?php endwhile; // end of the loop. ?>
    <div class=”navigation”>
    <div class=”alignleft”><?php previous_posts_link(‘« Previous’) ?></div>
    <div class=”alignright”><?php next_posts_link(‘More »’) ?></div>
    <?php $wp_query = null; $wp_query = $temp;?>

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘custom post_type list pagination’ is closed to new replies.