The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Reset get_posts() (1 post)

  1. Jong
    Posted 10 years ago #


    I have a template for a Page, which displays posts via get_posts() from a certain category. The thing is though, if there are no posts, I want to display the the_content() from the Page instead.

    My problem is, when using get_posts(), it overrides (a qualified guess) the default query for the Page, why have_posts() is left empty.

    How do I reset the query back to default?

Topic Closed

This topic has been closed to new replies.

About this Topic