What is the WordPress Loop?

3,141 views
3,058 views

Published on

This presentation describes what the WordPress loop is and why LoopBuddy is a great solution for tackling the complexity of the WordPress loop.

Published in: Education, Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,141
On SlideShare
0
From Embeds
0
Number of Embeds
1,084
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

What is the WordPress Loop?

  1. 1. What is the WordPress Loop? By Ronald Huereca September 15th, 2011
  2. 2. Most of you have seen this screen:
  3. 3. Most of you have not seen this one:
  4. 4. When you a post... Your post gets saved in a “posts” database table Your post can have: Post Meta (custom fields) Taxonomies (Categories, Tags, Post Format) Attachments (Featured images, galleries) And lots more!
  5. 5. WordPress and your themeautomatically turns this...
  6. 6. ...into a post your userscan see on a web site.
  7. 7. How do you go from this...
  8. 8. ...to this?
  9. 9. With a Query
  10. 10. Queries decide... Which items to display Under which category And sorted in a particular order And any other conditions you can think of
  11. 11. An example query... grab the post bygrab the post by ID 2338 post_status draft grab posts by sort by date published the post’s author
  12. 12. Once you have the results of the Query, you can display them.
  13. 13. Here is a query result displayed:
  14. 14. The results from a query are outputtedin the form of a Loop.
  15. 15. This post is one iterationof a WordPress Loop.
  16. 16. Let’s look what makes upa Loop Item in WordPress...
  17. 17. The Loop Dissected Date Published Post Author Post Title Post Content
  18. 18. So how do you create your ownLoop (cough, the hard way)? Create your own Query - http://codex.wordpress.org/Template_Tags/get_posts Create a page template in your theme - http://codex.wordpress.org/Pages#Page_Templates Assign that page template to a page in WordPress Anything more complicated, you may want to create your own child theme
  19. 19. Or you can use LoopBuddyand Builder (the easy way) Create unlimited queries and Loop layouts Override any section The front page The archive pages An individual post or page Search results Create a new section A “blog” archive A custom 404 page A sitemap
  20. 20. no coding or thememodifications required!
  21. 21. With LoopBuddy,you control the Loop
  22. 22. Try out LoopBuddy andbe blown away at the possibilities Try it at: http://trials.ithemes.com/config/loopbuddy Buy it at: http://pluginbuddy.com/purchase/loopbuddy

×