STRUCTURED CONTENTACF and custom post typesMost messy WordPress sites share one cause: every case study, location or team member is a free-form page, so each one is laid out a little differently and nothing can be reused. The fix is a content model. You decide what kinds of content the site holds and which fields each one has, and editors fill in those fields instead of designing pages. On WordPress, custom post types and Advanced Custom Fields (ACF) are how we build it.
What is a custom post type, and when do you need one?
A custom post type is a content type of your own, alongside Posts and Pages, with its own admin menu, archive and URL structure. You need one when the site holds many items of the same shape: case studies, locations, events, team members. If you would describe each item by filling in the same handful of boxes, it is a post type.
We register post types in code, in the theme or a small plugin, so they live in version control. Since ACF 6.1, ACF can also register post types and taxonomies from its admin screens, in both the free and PRO versions, and export the PHP code for them.
add_action( 'init', function () {
register_post_type( 'case_study', array(
'label' => 'Case studies',
'public' => true,
'has_archive' => true,
'show_in_rest' => true,
'supports' => array( 'title', 'thumbnail', 'excerpt' ),
'rewrite' => array( 'slug' => 'case-studies' ),
) );
} );Two details matter. The post type key must not exceed 20 characters and may only use lowercase letters, numbers, dashes and underscores. And editor is left out of supports on purpose: without editor support, WordPress does not load the block editor for that type, so editors see the title, featured image, excerpt and your fields, with no free-form content area. Keep editor and show_in_rest if you want blocks too.
What goes in a field group?
A field group is a set of fields with location rules that decide which edit screens it appears on. A case study group might show only where Post Type is equal to Case study; another might appear only on pages using a particular template. Rules can be combined with and/or logic. A typical case study group:
- Client sector: a select field, so filters and archives stay consistent.
- Challenge, approach and outcome: three text areas, with length guidance in each field's instructions.
- Services used: a Relationship field that links the case study to your service pages.
- Project images: a Gallery field, which is part of ACF PRO.
- Quote and attribution: two text fields, filled in only when the client has approved the wording.
The rule we follow: if a value will be filtered, sorted, reused or shown in more than one place, it is a field. If it is a paragraph of prose, a text area is enough.
When should you use Flexible Content or ACF Blocks?
Use them when a page genuinely needs variety, such as a long service page, but every section should still come from an approved set. Both are ACF PRO features.
Flexible Content is a field that holds layouts you define, such as a hero, a two-column text section, a testimonial row or a FAQ, each with its own sub fields. Editors add, edit and reorder layouts, and your template loops through them with have_rows() and get_row_layout() to render the matching partial.
ACF Blocks bring the same idea into the block editor. Each block is registered with WordPress's own register_block_type() and a block.json file, uses ACF fields for its settings and renders through a PHP template, so you can build custom blocks without React. We pick ACF Blocks when the rest of the site already uses the block editor, and Flexible Content when the screen is otherwise all fields.
How do Options Pages and the REST API fit in?
Some content belongs to the whole site rather than one page: the phone number, office hours, the footer call to action. ACF Options Pages, another PRO feature, add admin pages for that data, so it is edited once and used everywhere.
If the content needs to reach another system, such as a separate front end or an app, ACF can include field values in the WordPress REST API. Field groups are hidden from it by default; you switch on Show in REST API in the group's settings.
What does this change for editors?
Their job gets smaller and safer. Instead of a blank canvas, they get a form with labels, instructions and required fields. The template applies the design, so a new case study looks right the moment it is published, and a later redesign means changing templates, not hundreds of pages. Output still needs care: ACF's documentation says returned values should be escaped before they are printed.
Where to start
List the content types on your site and, for each one, the five to ten facts every item should have. That list is your content model. If you would like it built properly, with field groups, templates and editor guidance, see our WordPress development service or get in touch.
FAQ
Frequently asked questions
Do we need ACF PRO for custom post types?
No. Registering custom post types and taxonomies is available in both the free and PRO versions of ACF. PRO adds the Repeater, Flexible Content, Gallery and Clone fields, Options Pages and ACF Blocks. We write the content model down first, because it shows which of those features the site actually needs.
Can we add custom fields to an existing site without rebuilding it?
Yes. Field groups attach to existing post types and page templates through location rules, so you can add structure one content type at a time. The real work is moving repeated facts out of the page body into fields and then updating the templates to read them, which is best done type by type.
Will custom post types work with the block editor?
Yes, if the post type is shown in the REST API and supports the editor. WordPress needs show_in_rest set to true for the block editor, and ACF's post type screen enables Show in REST API by default. If you want editors to see fields only, leave the editor out of the supports list.
Should every page be built from ACF fields?
No. Fields suit content with a repeatable shape. One-off pages, such as an about page or a privacy policy, are often easier in the block editor with a few locked patterns. Mixing both is normal: structured post types for the content you have many of, blocks for the pages you have one of.
Can ACF content feed a headless front end?
Yes. Once Show in REST API is switched on for a field group, its values appear in an acf object in the standard REST API responses for posts, custom post types, users and terms. A separate front end, such as a Next.js site, can then read them alongside the core fields.
