Tag: the loop
Course: WordPress Theme Development (Core Concepts)
Welcome! WordPress themes are one of the most important topics that one must understand to be good at WordPress development. Themes underlie the entire visual half of WordPress sites, but often grow to do even more. Because of the visual importance, they’re a great place to dive in if you’re interested in getting to the “code-side” of WordPress. I myself “cut my teeth” on WordPress themes back in 2007 and 2008. WordPress themes were where I started to come to grips with the power (and limits) of PHP, CSS, and HTML. So this course is great for newbies, and those just looking to confirm their understanding of the whole system.
Getting to Know WP_Query
The WP_Query class is an exceptionally powerful tool in WordPress. As you may know, every WordPress site contains a database that stores many posts (of many post types) that make up the bulk of that site’s content, and WP_Query is the best way to fetch or retrieve a given selection of those posts for processing. So your theme files use it on regular basis, and a lot of plugins on your WordPress site will it.
Learning PHP for WordPress Development: while() Loops
Welcome to this discussion of PHP loops: what loops are, whey they’re important, and how to use PHP while() loops. This article continues our series explaining the basics of PHP for WordPress development.
WP_Query vs query_posts() vs get_posts()
This is not a new resource, but I just rediscovered and found it still incredibly relevant. Back in 2011, Andrey “Rarst” Savchenko put together a little diagram that shows the difference between three of the most common ways of dealing with getting posts in WordPress, a new WP_Query object, or the query_posts() or get_posts() functions.
Using WP_Query Objects Without the Loop
I really enjoyed David’s article from a few weeks ago on the basics of functional programming as it applies to WordPress’s nested data structures. One of the nice things about working with him is that I learn a lot, too. Today, I want to continue exploring the somewhat-functional world David introduced, and suggest some freer ways of interacting with a very important entity in WordPress: the WP_Query object.
An Introduction to Genesis for the Non-Genesis Developer
I have a confession to make: for a long time I’ve been scared of Genesis.
Two Key Principles for Understanding WordPress Functions
If you don’t understand WordPress functions, your code will do a lot of things the hard way.
The Three Core Concepts of WordPress Themes
Two weeks ago we talked about the languages you need to know to make or modify WordPress themes. This week we’re focusing specifically on the most important of those languages for theme work, PHP. PHP is the language that the majority of WordPress is written in, it’s the part of WordPress that makes the server work in the right way.