4.5Custom post types & fields (ACF)
The essentials in 30 seconds
- A CPT (custom post type) creates a new type beyond posts and pages: Projects, Members, Events.
- ACF adds structured fields (text, image, date, relationship) to these contents, without coding.
- This structuring turns WordPress into a business tool: the data becomes easy to enter and display cleanly.
Running mini-case — a catalogue of projects
Hassan wants to showcase his bespoke pieces: one record per piece, with the material, dimensions, year and a photo. Samir realises that one page per project would be unmanageable. He creates a "Projects" post type and dedicated ACF fields, then displays them in a template. Hassan then enters his pieces as structured records.
Sequel to case 4.4 — the site is customised and becomes a business tool.
1. Creating a post type
WordPress provides posts and pages natively. For a business need — a project catalogue, a member directory, an events list — you create a custom post type (CPT). It appears as a separate menu in the admin, with its own list and its own form.
A CPT is created with a plugin such as Custom Post Type UI or directly with ACF Pro. Samir defines a clear name, labels Hassan can understand, and enables useful elements: title, editor, featured image, archives. Avoid multiplying CPTs without need.
2. Adding fields with ACF
ACF (Advanced Custom Fields) adds custom fields to content: text, number, image, date, relationship, etc. Fields are grouped in a group assigned to the CPT. Hassan then fills in a structured record instead of free text, which guarantees consistent data.
Display is done via an ACF block, a child theme template or a page builder. Samir plans a readable display on the record and in lists. He also checks performance and ease of editing: a business tool must remain understandable for the client.
🔎 Concrete example — Project records (Samir's case)
CPT: Projects (palette icon, archives enabled).
ACF fields: Material (text), Dimensions (text), Year (number), Photo (image).
Entry: "Atlas Vase", enamelled stoneware, 32 cm, 2026.
Display: record template + projects grid.
→ Hassan adds a piece in a few minutes.
Result: a consistent catalogue that is easy to expand.
Lesson: structure serves the client as much as the design.
Section vocabulary
- CPT
- A custom post type, beyond posts and pages: Projects, Members, Events.
Simple example: a "Projects" menu in the admin.
What it is not: creating one page per project with no structure.
Reflex: repetitive business need = CPT.
- ACF
- A plugin that adds custom fields to content, without coding.
Simple example: Material, Dimensions, Year fields.
What it is not: writing everything in the post body.
Reflex: structured data = ACF field.
- Custom field
- Structured data attached to a content item: text, image, date, relationship.
Simple example: the creation year of a piece.
What it is not: repeating the information in free text.
Reflex: one field for each useful data item.
- Field group
- A set of ACF fields assigned to a post type.
Simple example: the complete record of a project.
What it is not: creating fields without assigning them.
Reflex: group = business form.
- Field display
- Retrieving and displaying the fields in a template, a block or a builder.
Simple example: the record displays material and dimensions.
What it is not: entering the fields without ever displaying them.
Reflex: structure then render.
In practice — Creating a custom post type
- Install ACF and a CPT creation plugin, then create a "Projects" type.
- Create an ACF field group: Client, Year, Image, Description.
- Add a project and fill in the structured record.
- Display the fields in a template or a block and check the rendering.
Ready-to-use script — explaining the business structure (25s)
"Your projects will not be simple pages: each piece will have a record with the material, dimensions, year and photo. You will add a piece in a few minutes, and the site will display it cleanly everywhere."
Show the entry screen: that is what convinces the client of the value.
Copy-paste template — CPT sheet
CPT: _______________
LABELS: _______________
ACF FIELDS: _______________
TYPE OF EACH FIELD: text / number / image / date / relationship
DISPLAY PLANNED: template / block / builder
ENTRY TESTED WITH THE CLIENT: yes / no
Catalogue
Projects or Products CPT with fields and a display grid.
Directory
Members CPT with role, photo and contact details.
Events
Events CPT with date, venue and registration.
Portfolio
Projects CPT with client, year, gallery and results.
✓ Best practices
- Create a CPT only for a repetitive need.
- Name the fields for the client, not for the developer.
- Plan the display from the moment you design the fields.
✗ Common pitfalls
- Multiplying CPTs without need.
- Putting structured data in free text.
- Creating fields without displaying them.
Key takeaways
- A CPT creates a business content type.
- ACF adds structured fields without coding.
- Entry becomes consistent and quick for the client.
- Display renders the data in templates.
48h Challenge — apply tomorrow
Create a "Projects" CPT with four ACF fields, enter two records and display them in a template or a grid. 35 minutes.
- I create a CPT with clear labels.
- I add ACF fields and enter a record.
- I display the fields in a template.
Frequently asked questions
Is ACF free?
ACF offers a free version sufficient for basic fields and a Pro version for advanced fields, options and CPT creation. For a simple business site, the free version may be enough.
When should I create a CPT rather than a category?
A category classifies posts; a CPT creates a distinct content type with its own fields and administration. As soon as content has a repetitive business structure, a CPT is more suitable.
What happens to the content if I deactivate ACF?
Field values remain stored in the database, but their display depends on the plugin or code that retrieves them. Deactivating ACF can therefore break the display of records: back up and test beforehand.
Hassan wants a "Projects" record with fields (material, dimensions, year). Which approach should he choose?