• Hi everyone,

    I’m trying to load posts which are as relevant as possible. How it is going to work is the user enters their city & state.
    If we have posts which match the city we’ll display that.
    If there are no posts with the city we’ll display the city’s county taxonomy.
    If there’s no posts for that county it will display the state tax.

    I’ve already tried to just query again under if(!have_posts) which didn’t work. I don’t understand why though because I’ve queried multiple times on many other pages without any problems.

    Is there any way to just check each taxonomy to see if there are active posts in it, while being able to check again and then query posts? If I’m missing something and there’s a completely different way of accomplishing this please let me know.

    Thanks

  • The topic ‘If no posts, query again?’ is closed to new replies.