Advanced Post Queries
by TomAuger on Aug 18, 2012
- 948 views
Whether you’re maintaining a personal blog, or leveraging WordPress as your CMS backbone, you will eventually want to modify what content WordPress sends to your pages from the database. WordPress ...
Whether you’re maintaining a personal blog, or leveraging WordPress as your CMS backbone, you will eventually want to modify what content WordPress sends to your pages from the database. WordPress itself provides a rich set of tools and methods for interacting with the database, most of which don’t even require database expertise. Each method is appropriate in certain circumstances, and should be avoided in others. This talk discusses each method of generating or modifying the database query when and how each should be used. While this discussion focuses on coding, even those just starting out will be sure to learn best practices around how and when to use “query_posts()” vs. “get_posts()” vs. “new WP_Query()” to build custom lists of posts. Seasoned developers will appreciate discovering the right way to use hooks like “pre_get_posts”, “request” and “posts_clauses” to access the query at the lowest levels.
Accessibility
Categories
Upload Details
Uploaded via SlideShare as Microsoft PowerPoint
Usage Rights
© All Rights Reserved
Statistics
- Likes
- 0
- Downloads
- 14
- Comments
- 0
- Embed Views
- Views on SlideShare
- 947
- Total Views
- 948