Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author GeekPress

    (@geekpress)

    Hi,

    Can you copy the code of your loop ?

    Thread Starter j.bukovski

    (@jbukovski)

    Hi, thanks for the replay, my code goes like this:

    <?php
    $wp_query->query( array('showposts='.$show_posts.'&post_type='. $post_type .'&Dress-types='.$long.'&paged='.$paged)); 
    
    $args = query_posts( array( 'post_type' => 'dress', 'Dress-types' => 'long' ) );
    $loop = new WP_Query( $args );
    while ($wp_query->have_posts()) : $wp_query->the_post(); 
    
    $content = get_the_content();
    $ttitle = get_the_title();
    $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    
    echo '<div class="dress">';
    echo '<a class="fancybox" rel="group" href="' . $url . '" title="' . the_title_attribute('echo=0') . '" >';
    echo get_the_post_thumbnail($post->ID, 'inf-single');
    echo '</a>';
    echo '</div>'; //dress
    
    endwhile;
    							if(function_exists('wp_simple_pagination')) {
    							wp_simple_pagination();
    }
    ?>
    Plugin Author GeekPress

    (@geekpress)

    Hi,

    Be careful, you use 2 custom query !

    Your variable $paged, you can replace this by get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1;

    Thread Starter j.bukovski

    (@jbukovski)

    hello,
    that was a mistake, everything is working, just tha pagination when it comes to a custom post type taxonomy ( ‘Dress-types’ => ‘long’ )
    🙁 can you please give me any idea how can I fix that. I am at dead end

    Plugin Author GeekPress

    (@geekpress)

    Hi,

    Add ‘paged’ => get_query_var(‘paged’) ? get_query_var(‘paged’) : ‘1’ in your loop.

    <div id="talent-main">
    
    <?php  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $args = array(
            'post_type' => 'talent',
            'posts_per_page' => 2,
            'paged' => $paged
        );
        $loop = new WP_Query( $args );
    ?>
    
    <?php
    		  if ( $loop->have_posts()) :  while ($loop->have_posts()) :$loop->the_post(); ?>
              <div id="post-<?php the_ID(); ?>" <?php post_class('multiple') ?>>			
    
                      <div class="post-image-talent">
                          <a class="post-frame <?php the_ID(); ?>" href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"></a>
                          <?php the_post_thumbnail('video-talent-thumb'); ?>
                      </div>
                  	  <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_short_title('', '...', true, '22') ?></a></h2>
              </div> 
    
    	  <?php endwhile;?>
    
    <?php if(function_exists('wp_simple_pagination')) {
        wp_simple_pagination();
    } ?> 
    
          <?php else : endif; ?> 
    
    	  <?php //wp_reset_query();	?>
    </div> <!-- main -->

    what i did wrong here??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Pagination on custom post type taxonomy’ is closed to new replies.