Page_navi plugin create but its not working

27 views Asked by At

page / 2 / is going but the homepage always appears help

        <div class="row">

            <div class="col-md-8">

            <?php $query = new WP_Query('post_type=homee');?>
            

            <?php if ( $query->have_posts() ) : while ($query->have_posts() ) : $query->the_post();?>
             
            <div class="card mt-4">

                    <a href="<?php the_field('homecard-link');?>" class='card-header-h'><h3 

class="card-title m-2">

                    <div class="card-footer text-muted ">

                        <i class="fas fa-table text-warning"></i>

                        Post Tarihi <?php the_field('homepost-history');?>
                    </div>

                    <a href="<?php the_field('homecard-link');?>"><img src="<?php 

the_field('homeimage');?>" class="card-img-top img-thumbnail">

                    <div class="card-body">

                        <p class="card-text"><?php the_field('homecard-text');?></p>

                        <a class="more" href="<?php the_field('homecard-link');?>"><button 

type="button" class="btn btn-dark more"> Devamını Oku

                </div>
                
                <?php endwhile; ?>

                 <?php else : ?>

                   <p><?php esc_html_e( 'Üzgünüz, Sayfa Bulunamadı' ); ?></p>

               <?php endif; 

                wp_pagenavi(array( 'query' => $query )); `this problem`

                wp_reset_query(); `this problem`

                ;?>
               
1

There are 1 answers

0
Sanjay Gupta On

Please try and replace wp query

<?php $query = new WP_Query('post_type=homee', 'paged' => get_query_var( 'paged' ));?>