WordPress is a flexible platform to build upon. In my talk we’ll take a flying look at some of the core WordPress concepts which have made it such a widely used platform.
I’m Phil Wylie
I work at iWeb as a WordPress developer
I’m one of the organisers of Staffs Web Meetup along with Natasha and Dave
I’ve been building with WordPress since 2007
Who uses WordPress (show of hands)?
WordPress is a platform, you can build a blog, a website… even an application on it
It’s the most widely used PHP application, in fact it powers 25% of the entire web. When looking at just the CMS space, that increases to 50%
So it’s safe to say WordPress is used by a lot of people
A lot of people with a broad range of experience...
You get well written, performant, secure WordPress sites, and not so great WordPress sites
Over the years I’ve seen the WordPress community having to defend its credentials as a serious platform
When i started, it was seen as "just a blog”, “it’s too simple”, it’s not capable of building a complex website
I graduate… get a job... in a blink of the eye, 4/5 years of iterative improvement later… we come full circle...
"WordPress is bloated", it’s too complex. Part of the community break off and build their own blogging platform, with the strapline "just a blogging platform”
Bear in mind, nothing changed
We’ve got to the point where some people hate WordPress simply because of it’s success. Success despite the fact it’s not written in the latest MVC framework/microframework/server-side JavaScript framework
Some people will never be happy
Why has WordPress become so popular?
Out of the box, WordPress gives you posts and pages. That’s it
It’s a good starting point for most projects
Laura is going to show us WooCommerce, an ecommerce plugin
Jonny is going to show us WordPress multisite, a really powerful feature
It’s a flexible platform
This is what i’m going to show you tonight. What can be built on top of WordPress
I’m going to show you some core WordPress concepts:
Post types
Taxonomies
Post meta
Unfortunately, I’ve not got the time to bore you with slides of code...
There are two main visible post types, posts and pages
You can register your own, events, case studies, team members, stores…
This is how plugins can easily add functionality, for example WooCommerce adds a product post type
All of these concepts (post types, taxonomies and post meta) use the existing WordPress database structure
It standardises how content is stored, making it easier to work with
In the posts table, there is simply a column which determines the post type
Out of the box you get categories and tags
You can register your own taxonomies to categories things, such as region, department, format, size...
Fields in the CMS for additional information
Stored as key-value
Doesn’t have to look like the standard WordPress post editor
Easier for clients to edit, just the fields that they need
Meta box libraries help build these forms quickly
CMB2
Advanced Custom Fields (ACF)
Different field types
Basic fields such as input, select, checkboxes
Advanced fields such as repeaters and maps
Build a store finder/dealer locator
Template hierarchy
A standard template file structure
Which template file is loaded for each URL
There is a cool diagram
There is standard order in which template files load in, so there is a fallback
WP_Query
WP_Query is used to retrieve posts
Write the queries within your template files
You can build complex queries. Get me all the team members (post type) in this department (taxonomy) with this job title (post meta)
Writes the SQL to return the team members
This was just a flying look
Come find me after, ping me on Twitter and I can go over any of this
Thank you
Questions?