Support » Plugin: WP-Paginate » wp-paginate in a custom post loop

  • Hello,

    I’m having a pleasant afternoon, trying everything i can find to make this work. It did work before but no joy in my current theme.

    I have a page with the following code in it. Does all the displaying of post loop but will not paginate

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $xib = new WP_Query( array(
    'post_type' => 'exhibitions',
    'posts_per_page' => 6,
    'orderby' => 'menu_order',
    'order' => 'ASC',
    'paged' => $paged
    						) );
    while ( $xib->have_posts() ) : $xib->the_post(); ?>
    	<div id="recordwrap">
    	<div id="record" class="storycontent">
    <p class="storytitle"><?php the_title(); ?></p>
    <?php the_content('more..'); ?>
    <div id="featuredimg">
     if ( has_post_thumbnail()) {
       $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full');
       echo '<a href="' . $large_image_url[0] . '" rel="shadowbox[ex]" title="' . the_title_attribute('echo=0') . '" >';
       echo '</a>';
    <?php endwhile; ?>
    <?php if (function_exists('wp_paginate')) {
    } ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you find a solution to this? I am also looking into how to use this plugin with a similar custom loop.

    I did in the end after trying mod rewrite hacks and plugins. The rewrite thing however led me to sort out my custom post type in functions.php so that i had

    'rewrite' => Array('slug' => 'exhibition')

    in the array under register_post_type

    That made everything work. So i’d say sort out the functions first.

    In other words the path to the pages was being messed up, hence the 404.

    I went with wp_navi in the end too because i wanted page breaks that looked consistent with the archives. wp-paginate doesn’t do page breaks yet as far as i know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp-paginate in a custom post loop’ is closed to new replies.