Forums Forums Search & Filter Pro Pagination in wp-query, with ajax

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #228981

    Hello,

    I try to add a pagination in custom wp query, with filters options.
    I have 3 drop-down filters (custom taxonomy filter)
    And i need ajax interaction when i click one previous/next pagination AND when i click on one taxonomy filter.

    But i don’t really know who add the pagination. I tried to llok in the WP support and your plugin support but i don’t find a good explicaton

    You can look my code here:

     <div class="wrapper">
                    <section class="jobs-list">
                        <div class="jobs-list__filter"><?php echo do_shortcode('[searchandfilter id="'.$filter_startup_id.'"]'); ?></div>
                        <div class="jobs-list__list-container" id="jobs-list-container">
                            <ul class="list" id="jobs-list">
                                <?php
                                    global $query;
                                    $paged = ( get_query_var('page') ) ? get_query_var('page') :1;
                                    $args = array(
                                        'post_type'			=> 'job-type',
                                        'posts_per_page'    => -1,
                                        'paged'             => $paged,
                                        'search_filter_id' => $filter_startup_id,
                                    );
                                    $query = new WP_Query( $args );
                                    if($query->have_posts()) : while ($query->have_posts() ) : $query->the_post();
                                        get_template_part( 'partials/template-parts/post-parts/content', 'news-job-item' );
                                    endwhile;
                                    wp_reset_postdata();
                                    endif;
    
                                ?>
                            </ul>
                        </div>
    
                        <!-- Navigation code ? -->
    
                    </section>
                </div>
    

    Could i get some help ?

    Trevor
    #229014

    If you look in the plugin folder, you will find a templates folder. Inside that are two exemplar template files.

    They show how the basic structure should look.

Viewing 2 posts - 1 through 2 (of 2 total)