WordPress Cheat Sheet: The Loop Code Snippet

With the popularity of our old WordPress cheat sheet, we’ve decided to fire up a new batch of these quick pocket guides that you guys n’ gals can download, save to your phones for a fast reference, or even print out and keep next to your desk while you’re working on customizing WordPress to do your bidding. Today’s cheat sheet: The Loop Code Snippet!

The Loop is easily one of the most powerful and crucial pieces of WordPress to understand, and while there’s a lot already written about it, it’s also just nice to have a quick reference for the loop in the event that you need a fast refresher.

This is the quick and dirty version of the loop. No frills, no extra styling, content, categories, tags, or anything like that.

This example is a little bit more elaborate. It includes a lot of the core WP tags that you’re likely to use in a basic, vanilla, WordPress loop. This means that this one may be a little bit more useful as a starting point… but by no means should this be the limit to what you can do with the loop:

Don’t miss out on Our Beginners Guide to The_Loop(), or our Advanced Guide to WordPress Queries, which plays right into the content of this cheat sheet.

Oh, and we’ll be doing our best to keep these sheets updated as WordPress grows into new versions, but if you spot an error (or just want to send some love), let us know in the comments!

Fonte: http://code.tutsplus.com/articles/wordpress-cheat-sheet-the-loop-code-snippet–wp-22305

Facebook Comments
Rate this post