What is the WordPress Loop?

Preview:

DESCRIPTION

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

Citation preview

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 ?

Most of you have seen this screen

Most of you HAVE NOT seen this one

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!

WordPress and your theme automatically turns this...

...into a post your users can see on a web site

How do you go from this...

...to this?

With a Query

Queries decide...

Which items to display

Under which category

And sorted in a particular order

And any other conditions you can think of

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

Once you have the results of the Query, you can display them

Here is a query result displayed

The results from a query are outputted in the form of a Loop

This post is one iteration of a WordPress Loop

Let’s look what makes up a Loop Item in WordPress...

The Loop DissectedDate Published Post Author

Post Title

Post Content

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

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

No Coding or Theme modifications Required

With LoopBuddy, you control the Loop

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

Recommended