How Custom WordPress Themes Are  Built

How custom WordPress themes are built, with real world examples

I often get asked what a custom WordPress theme is, more specifically how to build one and whether it is really needed.

The best way to answer these are by showing some real world examples while explaining common approaches and patterns frequently used by custom WordPress developers.

Advanced Custom Fields

A very popular plugin used in custom WordPress themes, I’d say this is the #1 reason behind the success of WordPress as a custom business CMS. It allows you to create specific forms for managing content, and attach those forms to specific pages, posts, categories, users and a lot more.

When editors and writers publish content, they’re able to provide additional, specific information into these forms. Custom theme developers then pull that information into the theme and either display it, or use it to transform the front facing page in custom ways.

These ACF “field groups” can also be added to pages using the Gutenberg editor, and also individual custom blocks used within the editor. This allows custom theme developers to create highly specific things with less code, and more stability.

Flexible Content Fields

“Flexible Content” is a very powerful field type that ACF provides. It’s commonly used by agencies and developers in custom themes to control advanced, modular layouts that are controlled and predictable.

Flexible Content field provides a simple, structured, block-based editor. Using layouts and sub fields to design the available blocks, this field type acts as a blank canvas to which you can define, create and manage content with total control.

ACF Flexible Content Documentation

Here’s an example of one in action: I’ve created a module (or layout) that can be used to add a common 50/50 image and content layout to a given page. The controls are minimal, and when editors use this, the output is stable and aligns with the organization’s brand.

Editing View

This is what the edit view looks like, or this flexible content layout.

Flexible Content: 50/50 Image & Content Modules

Frontend Website

This is what is produced on the frontend of the website based on the input provided.

Flexible Content: 50/50 Image & Content Frontend

Custom Post Types

WordPress comes with two types of content, Pages and Posts. Under the hood these are called post types, and theme and plugin developers can create custom types for managing specific content types in an isolated way.

Common uses include team profiles, news, resources, product announcements and landing pages. These custom Post Types are also commonly combined with ACF field groups to allow editors to publish the information needed for a custom template in a structured way.

Video Post Type

This custom post type allows editors to publish videos to a specific “Video Library” on their website.

Custom Post Type: Videos List in CMS

Custom Post Type: Video Publishing

The corresponding frontend view for a single video looks like this:

Custom Post Type: Single Video Frontend

Custom Taxonomies

WordPress comes with categories and tags, which are known as Taxonomies. Taxonomies are made to help organize posts into groups, and each one can be setup in a list view on your website.

Like post types, these too can be created custom for handling different types of terms. Common uses include a post location, a team profile division, or a type of resource.

Custom Taxonomies: App Visibility Edit View

Custom Post Type with Custom Taxonomies: Team Profiles

Custom Page Templates

Custom WordPress themes are usually built to provide a unique, branded experience or product that stands out. To do this they’ll need to support unique, often professionally designed, page templates. This is best handled by custom page templates, which theme developers can use to define separate PHP templates that editors can choose for a given page using a drop-down in the admin.

Custom Page Template: Pricing Page

Custom Code & APIs

Another thing custom WordPress developers (good ones) do is create specific systems to solve or support business needs. Things like custom standalone HTTP APIs, advanced Hubspot or SalesForce integrations, and modern analytics tracking with tools like Segment.

These are the tasks that are important to have handled by a solid developer with an understanding of web development beyond WordPress. Custom code doesn’t correlate with complexity, and in fact I believe the best developers are those who understand the simplest, most effective way to handle a requirement.

WordPress Custom Code JSON API Example


Hopefully this gives you a solid idea about what a custom WordPress theme looks like, and when and why you might need one. I’ve been building custom WP themes since 2008… no joke. The first theme I edited to be my own was the K2 theme, look that relic up for a good laugh. That said, a custom theme is definitely not the best approach for many websites.

Elementor powered WordPress websites are a popular option for small business, microsites or any other small business website that wants to do a lot without a developer. I could go on for a long time about other approaches, but the point is that custom themes are only the best approach for certain situations. Hopefully this guide helps you determine on your own if they’re for you.

If you have any questions, suggestions or comments please let me know, just drop me a note through the contact form.

Related Articles

Meet the Author

Kevin Leary, WordPress Consultant

I'm a custom WordPress web developer and analytics consultant in Boston, MA with 16 years of experience building websites and applications. View a portfolio of my work or request an estimate for your next project.