Mock dataWP_GRAPHQL_ENDPOINT not setbuilt 2026-08-18 02:02 UTC

Reference build

Every content type, one API call

Placeholder copy showing how a hero assembled from ACF fields reaches a static Astro front end.

01 — Core WordPress fields

The editor's own content

4 min read — computed in PHP and exposed as a first-class GraphQL field, so the front end does no content maths of its own.

Placeholder body copy

This block is the WordPress content field — everything an editor types into the main editor arrives as a single HTML string. The front end renders it verbatim, which is why the markup below is styled by a WYSIWYG stylesheet rather than by components.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Nullam quis risus eget urna mollis ornare vel eu leo.

  • Lists, headings and links keep their editor formatting.
  • Images pasted into the editor arrive as raw <img> tags.
  • Structured content should live in ACF fields instead — see below.

Give editors structure where structure matters, and free text where it does not.

02 — ACF Repeater

Numbers come from a Repeater

  • 01

    Repeater rows

    Each row is one entry an editor can add, reorder or delete.

  • 100%

    Static output

    No client-side fetching — the HTML ships fully rendered.

  • 1

    Request per page

    One GraphQL document supplies the entire route at build time.

  • 0

    Theme files

    WordPress renders nothing; it is a content API only.

03 — ACF Flexible Content

A page builder, served as a union type

Text and media, side by side

A Flexible Content layout behaves like a page builder block. The editor picks a layout, fills the fields, and the front end maps that layout name to a component. Placeholder copy continues here so the block has realistic weight.

Placeholder link
Placeholder section image
Structured fields are the difference between a site an editor can run and one that needs a developer for every change.
Placeholder portraitPlaceholder NamePlaceholder Role, Placeholder Company

The same layout, mirrored

Reusing one layout with a mediaPosition select keeps the component count low while still giving editors control over rhythm down the page.

Placeholder section image

Gallery field

Closing call to action

Placeholder supporting copy for the final block on the page.

Back to top

04 — ACF Relationship

Related posts (Relationship field)

05 — Reference

Field map

Every piece of content on this page, and the file that renders it.

On the pageWhere it lives in WordPressField typeFront-end file
HeroACF group `pageHero`Text, Textarea, Image, LinkHero.astro
Featured imageCore `featuredImage`WP mediaWPImage.astro
Body copyCore `content`WYSIWYG (HTML string)RichText.astro
StatsACF group `pageStats`RepeaterStats.astro
Page sectionsACF group `pageSections`Flexible ContentFlexibleSections.astro
Related postsACF group `pageRelated`RelationshipRelatedPosts.astro
Head metadataACF group `pageSeo`Text, Textarea, Image, True/FalseBaseLayout.astro
Reading timeCustom GraphQL fieldregister_graphql_field() in PHPindex.astro