How Morphic works
Morphic adds a visual builder for content to WordPress. You describe a kind of content as a model, add fields to it, and save entries. Morphic stores the entries in its own tables, and every model is also available through the REST API.
Why it matters
Entries belong to a model, so you create the model before you add entries. Once a model exists, the same content is available in the admin, through the REST API and in your theme.
Requirements
The plugin is named "Morphic – Adaptive Content Engine" in WordPress. Its description includes "A fast ACF alternative with a REST API for headless sites."
Morphic needs WordPress 6.9 or newer and PHP 8.0 or newer. On PHP older than 8.0, Morphic pauses and shows an admin notice to users who can activate plugins.
What you build
- Model: one kind of content, such as a list of articles. Its entries are listed under Content in the admin.
- Component: a group of fields that you reuse inside models.
- Settings page: a model that holds one entry only, such as site settings or a footer. Its entry is listed under Settings pages.
- Entry: one saved item of a model.
- Field: a value in a model. Each model has the tabs Fields, Filters & search and Access.
Morphic Pro adds review, translation and discussion panels to entries. The entry History panel links to the Pro page.
The admin screens
Morphic opens from the Morphic item in the WordPress admin menu. The sidebar has these areas:
- Home: the start page.
- Content: one list per model.
- Settings pages: one page per settings page model.
- Build: Models, Import from WordPress and API & integration, depending on your role. Help & docs and Settings sit at the foot of the sidebar.
Only administrators change models, import content and open Settings. Other users see only API & integration under Build, and Help & docs at the foot of the sidebar.
Entries can be published or unpublished when their model has a publishing field. An entry you delete with Move to bin goes to the bin, where you can select Restore.
The REST API
Every model is available through the REST API under the morphic/v1 namespace. The main routes are:
/items/{type}to list and create entries, and/items/{type}/{id}to read, update, patch and delete one./find/{type}/{index}and/by/{type}/{unique}to look up entries by an indexed or unique field./search/{type}to search a model.
Public models need no key. Access presets are Public website (everyone can see; editors manage), Members only (logged-in users can see; editors manage) and Private (only administrators). Keys let an app or website read content without a WordPress account. They are listed on the API keys tab of Settings.
WordPress pages and fields
Morphic can add its content to the WordPress screens you already use:
- Post and page edit screens: a Morphic box for each model you attach to Posts or Pages.
- User profile and user edit screens: a Morphic section for each model you attach to Users.
- Show in WordPress: mirrors entries as WordPress posts, or only published ones when the model has a publishing field. Tools that read posts, such as SEO plugins, can then use them.
- Shortcodes:
morphic_list,morphic_entryandmorphic_fieldplace Morphic content in your theme or on any page. - Template functions:
morphic_field()andmorphic_setting()read Morphic values in theme code. - Public pages: a model with a Slug field can give each entry its own page on your site. Add a Slug field first; it becomes the page address.