conditional array
-
Hey folk,
I have a template that visualizes posts in a certain category in a certain way. It calls em up via:
<?php $args = array( 'order' => 'ASC', 'category_name' => 'blog', 'post_type' => 'post', 'posts_per_page' => 16, 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1) ); query_posts($args);What I would like is for that same visualization to take place for posts under a different category as well, but also in DESC order as opposed to ASC. So basically the functionality I’m looking for is
If category name is blog, show blog posts in ASC order
OR
If category name is (say) announcements, show posts categorized as “announcements” in DESC order.What do you folk think? Sorry to come here – I feel like I’m not really understanding the Codex too well, and I’m very new at this stuff.
For reference, the theme I’m using is Slider Responsive by DESSIGN (link). The specific php is tpl-blog.php. Thanks everyone!
The topic ‘conditional array’ is closed to new replies.