php - Empty content after WP_Query() -


i have plugin calls specific page. below code works fine , calls page inside modal, reason rest of page doesn't execute after using code , returns empty:

        $args = array(           'p'         => 33, // id of page, post, or custom type           'post_type' => 'any'             );          $my_query = new wp_query($args);          while ($my_query->have_posts()) : $my_query->the_post(); ?>             <div class="entry">                 <?php the_content(); ?>             </div>         <?php           wp_reset_postdata();         endwhile;  

any idea what's going on?

thanks,

try wp_reset_query(); instead of wp_reset_postdata(); after endwhile; may can work you.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -