• 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!

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

    http://wordpress.org/extend/plugins/my-posts-order/

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

    (@kapilchugh)

    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.