Combining two small scripts
-
Hi there –
I have two working scripts that I would like to combine into one.
This one prevents posts in subcats from displaying on top-level category archive:
<br /> <?php<br /> if ( is_category() ) {<br /> $cat = get_query_var('cat');<br /> query_posts(array('category__in' => array($cat)));<br /> }<br /> ?><br />
And this one alphabetizes the posts:
<br /> <?php if (is_category())<br /> { $posts = query_posts($query_string . '&orderby=title&order=asc'); } ?><br />
I can get either one of these working at a time, but not both together. Is there any way to combine them?
Thanks!
[ Moderator note: your other post was deleted as duplicates or topics that point to other topics is not helpful. The forum you were using was fine BTW. ]
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Combining two small scripts’ is closed to new replies.