Is this expected is_home() behavior?
-
In the following code:
query_posts( ‘showposts=5&cat=4’ );
if (have_posts()) { while (have_posts()) { the_post();
if(is_home()){
////do some stuff
}
if(is_category()){
/////do some other stuff
}When on my home page, is_home returns false and is_category returns true.
If I remove the &cat=4 from query_posts things behave as normal. Of course then I get all the posts instead of just the posts from category 4 like I want.
Is this expected behavior or a bug?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Is this expected is_home() behavior?’ is closed to new replies.