Ordering Posts
-
I’ve got a theme that I’m using and it’s throwing posts up on a slider on my home page but I would like to order the way they show up. The code currently in place is:
<?php //OptionTree Stuff if ( function_exists( 'get_option_tree') ) { $theme_options = get_option('option_tree'); $homeCategory = get_option_tree('home_category',$theme_options); $homeNumber = get_option_tree('home_number',$theme_options); } ?> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('cat='. $homeCategory .'&showposts='. $homeNumber .''.'&paged='.$paged); while ($wp_query->have_posts()) : $wp_query->the_post(); ?>And the way I would like this to be ordered would be the following:
orderby=meta_value&meta_key=event_date&order=ASCI’ve never used option tree before in obtaining information from some theme options, so I’m kind of confused on how I would integrate that ordering method with the other code. Any help is much appreciated, thanks!
Jarth
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Ordering Posts’ is closed to new replies.