What is the WordPress Loop?
-
Upload
webdesigncom -
Category
Education
-
view
2.843 -
download
1
description
Transcript of What is the WordPress Loop?
![Page 1: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/1.jpg)
September 15th, 2011
By Ronald Huereca
W h a t i s t h e Wo r d P r e s s L o o p ?
![Page 2: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/2.jpg)
Most of you have seen this screen
![Page 3: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/3.jpg)
Most of you HAVE NOT seen this one
![Page 4: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/4.jpg)
When you publish 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!
![Page 5: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/5.jpg)
WordPress and your theme automatically turns this...
![Page 6: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/6.jpg)
...into a post your users can see on a web site
![Page 7: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/7.jpg)
How do you go from this...
![Page 8: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/8.jpg)
...to this?
![Page 9: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/9.jpg)
With a Query
![Page 10: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/10.jpg)
Queries decide...
Which items to display
Under which category
And sorted in a particular order
And any other conditions you can think of
![Page 11: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/11.jpg)
An example query...Grab the Post by ID 2338 Grab the post by post_status draft
Grab posts by the Post’s author Sort by Date Published
![Page 12: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/12.jpg)
Once you have the results of the Query, you can display them
![Page 13: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/13.jpg)
Here is a query result displayed
![Page 14: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/14.jpg)
The results from a query are outputted in the form of a Loop
![Page 15: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/15.jpg)
This post is one iteration of a WordPress Loop
![Page 16: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/16.jpg)
Let’s look what makes up a Loop Item in WordPress...
![Page 17: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/17.jpg)
The Loop DissectedDate Published Post Author
Post Title
Post Content
![Page 18: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/18.jpg)
So how do you create your own Loop (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
![Page 19: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/19.jpg)
Or you can use LoopBuddy and 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
![Page 20: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/20.jpg)
No Coding or Theme modifications Required
![Page 21: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/21.jpg)
With LoopBuddy, you control the Loop
![Page 22: What is the WordPress Loop?](https://reader034.fdocuments.in/reader034/viewer/2022042700/5565a27fd8b42a083a8b480d/html5/thumbnails/22.jpg)
Try Out LoopBuddy and Be Blown Away at the Possibilities
Try it at: http://trials.ithemes.com/config/loopbuddy
Buy it at: http://pluginbuddy.com/purchase/loopbuddy