Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter richard26

    (@richard26)

    Failing to display a limited number of results , is it possible to only display the unfiltered results. When you click on ” View Results ” listings open on another window.

    I reiterate my sincere thanks for your help and for the quality of your plugin

    Here the website in construction : clic

    Patrick

    (@zaanmedia)

    Hallo Richard,

    I did have a look at the code to figure it out my self but it seems they don’t use simple a wp query to load the results… or at least i can’t figure it out!

    I’m not a proffesional when it comes to coding but a simple post query should be easy to add x listings per page if i’m not wrong? Don’t think the plugin is not made this way!

    Hope they can sort it out and maybe include it in a next release.

    Thread Starter richard26

    (@richard26)

    Hello Zaanmedia,

    Thank you for your quick response. I hope the solution will be integrated in the next version.

    I’ll get on my side an alternative. I will keep you informed if I could apply a solution

    If other people can help me that would be great

    Thank you again

    Plugin Author Barry Kooij

    (@barrykooij)

    Hey there,

    You are correct that our listing results currently do not have pagination yet. We will add this in the next version, sorry about the inconvenience.

    Kind Regards,

    Barry Kooij

    Thread Starter richard26

    (@richard26)

    Thank you very much,

    Congratulations for the quality of your work!

    Richard

    Hallo Richard,

    Still playing arround with some code! For now i have pagination working for custom pages… Maybe you can extend on the following code! I don’t have the search function working as of yet!

    Here is the code!

    <?php get_header();
    
    /**
     * Template Name: listing
    **/
    
     ?>
    
    <?php 
    
      $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
    
      $custom_args = array(
          'post_type' => 'wpcm_vehicle',
          'posts_per_page' => 2,
          'paged' => $paged
        );
    
      $custom_query = new WP_Query( $custom_args ); ?>
    
      <?php if ( $custom_query->have_posts() ) : ?>
    
        <!-- the loop -->
        <?php while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?>
          <article class="loop">
            <?php echo get_the_post_thumbnail( $page->ID, 'thumbnail' ); ?>
            <a href="<?php the_permalink() ?>"><h3><?php the_title(); ?></h3></a>
    	<li class="wpcm-price"><?php $price = get_post_meta($post->ID, 'wpcm_price', true); ?> <?php echo $price; ?></li>
    	<li><?php $mileage = get_post_meta($post->ID, 'wpcm_mileage', true); ?> <?php echo $mileage; ?></li>
    	<li><?php $frdate = get_post_meta($post->ID, 'wpcm_frdate', true); ?> <?php echo $frdate; ?></li>
    	<li><?php $engine = get_post_meta($post->ID, 'wpcm_engine', true); ?> <?php echo $engine; ?></li>
            <div class="content">
              <?php the_excerpt(); ?>
            </div>
          </article>
        <?php endwhile; ?>
        <!-- end of the loop -->
    
        <!-- pagination here -->
        <?php
          if (function_exists(custom_pagination)) {
            custom_pagination($custom_query->max_num_pages,"",$paged);
          }
        ?>
    
      <?php wp_reset_postdata(); ?>
    
      <?php else:  ?>
        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
      <?php endif; ?>
    
    <?php get_footer(); ?>

    Offcourse you need to style the elements to match your website.

    U can use this for the time being! Now lets wait for a plugin update where pagination is fully working ??

    Patrick

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘numbered pages for results’ is closed to new replies.