• Hi!
    query_posts function modifies is_home function return. If you do:

    echo is_home();
    query_posts(p=1);
    echo is_home();

    the second is_home() returns false. Is this a feature or a bug?

    I want to output a specific post comments in the home page. Also in its own post page, but with diferent format.
    If I do the query_posts query, I’m not able to distinguish the home stuff inside comments.php template. Any workaround to this?

Viewing 1 replies (of 1 total)
  • It would be a feature in the sense that a p query var informs WordPress one is performing a single post query (i.e. reading a post). Add this for where you need to override query_post() setting the $wp_query condition:

    $wp_query->is_single = false;

Viewing 1 replies (of 1 total)
  • The topic ‘is_home and query_posts interference’ is closed to new replies.