Appearance
Create Parent Post
Create Parent Post adds a "create new" switcher to a submission form, so the person filling it in can create the related parent post at the same time — adding a new venue while submitting an event, or a new brand while submitting a product.
Overview
Voxel's post-relation field lets a submitter pick an existing parent post. If the parent doesn't exist yet, they are stuck: they have to abandon the form, create the venue, and come back.
This function adds temporary fields to the child form — name, location, logo, description, categories, anything you map — and on submission it creates the parent post from them, links it through the relation field, and cleans the temporary values off the child.
Key Features
- A "create new" switcher on any submission form with a post-relation field
- Map any parent fields you want collected: core fields, taxonomies, images
- Reuses an existing parent with the same name instead of duplicating it
- Can assign the child's paid listing plan to the new parent, with or without consuming a submission slot
- Indexes the new post so it appears in search and on maps immediately
- Validates the whole configuration against your real post types and fields
- Lists failed submissions with the reason
Setup Instructions
Step 1: Enable the Function
- Navigate to Voxel Toolkit → Functions
- Find Create Parent Post and toggle it on
Step 2: Point It at the Relation
In the settings, set the relation field key — the post-relation field on the child form that links to the parent. This is the field the newly created parent will be attached to.
Step 3: Map the Fields
Set the title field (which temporary field holds the parent's name) and then map whichever core fields and exposed taxonomies you want the submitter to fill in for the parent.
Keep this short. Every field you map is another field on an already long form. Collect enough to make the parent usable and let its owner complete it later.
Step 4: Decide What the New Parent Looks Like
- Parent status — published, or pending review. Pending is the safer default, since this creates posts from the front end.
- Parent listing plan — optionally give the new parent the same paid plan as the child
- Duplicate scope — how an existing parent with the same name is matched, so submitters reuse rather than duplicate
- Delete temporary data — clears the temporary values off the child post once the parent exists
Step 5: Show the Switcher at the Right Time
Set the create switcher key to control where the switcher renders on the form.
This pairs well with Relation Conditions: show the "create new" switcher only while no parent has been selected, so the form offers one path at a time.
Validation and Failures
The settings screen validates the configuration against your actual post types and fields, so a renamed field key surfaces there rather than as a silently broken form.
It also lists submissions that failed, with the reason — worth checking after you first turn this on, since misconfiguration usually shows up as a handful of failures rather than an obvious error.
Troubleshooting
The Switcher Doesn't Appear
Check the relation field key matches the field on the child form, and that the create switcher key is set. The settings screen's validation will normally name the mismatch.
Duplicate Parents Are Being Created
Two submitters spelled the venue differently. Review the duplicate scope setting — matching is by name, so "The Blue Room" and "Blue Room" are different parents.
The New Parent Doesn't Show in Search
The function indexes new posts on creation. If one is missing, confirm it was actually published rather than left pending.
Requirements
- Voxel theme with a post-relation field on the child post type
- A create-post form for the child post type
- Relation Conditions is optional, for conditional display

