Support » Plugin: My Post Order » Can't order my posts

  • Hi,

    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; ?>

Viewing 1 replies (of 1 total)
  • Plugin Author Kapil Chugh


    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Can't order my posts’ is closed to new replies.