Hi i am new in wordpress and want to know about query_posts() function. If there is index page or home page than there is no need this function to display post but if i made custom page than there this function must used to display. Why?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
||||
|
|
|
See When should you use WP_Query vs query_posts() vs get_posts()? For a custom post type or a simple page you don’t need When in doubt use |
|||
|
|
|
i agree w/ get_posts() for a secondary loop. if you need to modify the query on one of your templates i'd suggest using pre_get_posts() |
|||
|
|