Tagged Questions
0
votes
1answer
1k views
When to use Wordpress loop or Foreach loop?
Under what circumstances would you, (should you?) use a foreach loop, instead of the wordpress loop.
I have no real coding need, but I'm curious. What's good practice here?
Should I:
...
1
vote
3answers
288 views
will post_id ever change? Can I safely use post_id for custom queries?
What are the best practices for using post_id? Can I use this safely in my templates to call specific posts, or will these post_id's ever change?
The reason I ask is that randomly today the ...
145
votes
3answers
37k views
When should you use WP_Query vs query_posts() vs get_posts()?
It seems like half the tutorials in the codex and around the blogosphere use query_posts() and half use WP_Query. What's the deal?