My Post Order
Can't order my posts (2 posts)

  1. Mirizarry
    Posted 3 years ago #


    For some reason I can not get this to work on my site. Here's my code below, can someone tell me if I'm doing something incorrectly? I don't have any other post/page ordering plugins installed.

    Thanks in Advance!

    				$wpquery = new WP_Query( array(
    					'section_name' => 'staff_reorder',
    					'category_name' => 'staff'
    				<?php if ($wpquery->have_posts()) : ?>
    				<?php while ($wpquery->have_posts()) : $wpquery->the_post(); ?>
    <div class="staff-member">
    		<div class="staff-photo">
    		<a href="<?php the_permalink(); ?>"><img src="<?php echo get_field('staff_portrait'); ?>" /></a>
    		<div class="staff-name"><?php echo get_field('staff_name'); ?></div>
    		<div class="staff-title"><?php echo get_field('staff_title'); ?></div>
    </div> <!-- close staff member -->
    	<?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>


  2. Kapil Chugh
    Plugin Author

    Posted 3 years ago #

    There is no need to add 'category_name' => 'staff'. You can keep it simple like this :
    $wpquery = new WP_Query( array('section_name' => 'staff_reorder'));

    and select posts from that category while creating section.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • My Post Order
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.