Sorting don't work on my navigation
-
Any ideas why my navigation don’t sort pages in any other order? I would like them to sort by the order number. Now the order is always the same. Sort oder desc displays the same order than asc.
Here’s the code:
<ul id="secondaryNavi"> <?php $args=array( 'post_parent' => 8, 'post_type' => 'page', 'sort_column' => 'menu_order', 'sort_order' => 'desc', ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a> <?php $meta_one = get_post_meta($post->ID,'description', true ); ?> <div class="description"><?php echo $meta_one; ?></div> </li> <?php endwhile; } ?> <?php wp_reset_query(); // Restore global post data stomped by the_post().?> </ul>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Sorting don't work on my navigation’ is closed to new replies.