Edit Post Button Module
Purpose and when to use
The Edit Post Button module is a standalone Divi Form Builder module (not a child of Form). Use it on Theme Builder templates, single templates, or loops to let eligible users edit or delete the current post, page, product, or CPT entry from the frontend.
Use this module when you need:
- An Edit button that opens a create/edit form page or a modal layout
- A Delete button with confirmation and optional redirect
- Buttons inside Theme Builder or loop layouts that target the correct post ID
For the full workflow (create form + Theme Builder placement), see Edit post.
Compatibility and performance notes
- Divi Version: Divi 5 Visual Builder module (
de-form-builder/edit-post-button) - Permissions: Guests never see the button. Logged-in post authors and users with
manage_options(administrators) can see it. - Targeting: Resolves the current post from the singular query, loop post IDs, or remapped Divi layout contexts
Add to page
- Open a Theme Builder template (or page layout) for the post type.
- Add the Edit Post Button module where the button should appear.
- Set Button Action to Edit Post or Delete Post.
- For edit: choose modal layout or an Edit Form Page that contains your create/edit form.
- Save and view a single post as the author (or an administrator) to verify the button appears.
Settings
Content — Action Settings
| Setting | Type | Default | Depends On | Notes |
|---|---|---|---|---|
| Button Action | select | Edit Post | - | Edit Post or Delete Post |
| Edit Button Text | text | - | Edit Post | Label for the edit button |
| Delete Button Text | text | - | Delete Post | Label for the delete button |
| Fullwidth Button | boolean | off | - | Button spans its container |
| Show to Author Only | boolean | - | - | Present in the builder; see Permissions for actual Divi 5 visibility |
Content — Edit Settings
Visible when Button Action is Edit Post.
| Setting | Type | Default | Depends On | Notes |
|---|---|---|---|---|
| Show in Modal | boolean | off | - | Open the edit form in a modal instead of navigating away |
| Edit Form Page | select | - | Modal off | Page that contains the edit/create form; used for redirect |
| Open in New Tab | boolean | off | Modal off | Opens the edit form page in a new tab |
Content — Modal Settings
Visible when Show in Modal is on.
| Setting | Type | Default | Depends On | Notes |
|---|---|---|---|---|
| Modal Form Layout | select | - | Modal on | Divi Library layout that contains the edit form |
| Modal Style | select | Center | Modal on | Center or Side |
| Reload Page After Save | boolean | - | Modal on | Refresh after a successful modal save so visitors see updated content |
Content — Delete Settings
Visible when Button Action is Delete Post.
| Setting | Type | Default | Depends On | Notes |
|---|---|---|---|---|
| Delete Confirmation Message | text | - | Delete Post | Shown before delete |
| Redirect URL After Delete | text (dynamic) | empty | Delete Post | Leave empty to stay on the current page; supports dynamic content |
Design
| Setting | Type | Default | Depends On | Notes |
|---|---|---|---|---|
| Button Alignment | select | - | - | Left, Center, Right, Justified |
| Edit / Delete button groups | Divi button | - | - | Style edit and delete button appearances |
| Modal styling | various | - | Modal on | Overlay background, close icon/color/size, loading animation color |
| Standard Divi groups | various | - | - | Sizing, spacing, border, box shadow, filters, animation, transform |
Advanced
Standard Divi groups: Attributes, CSS, Conditions, Visibility, Transition, Position, Scroll.
Permissions
On Divi 5, the button renders only when:
- The visitor is logged in, and
- The visitor is the post author or has the
manage_optionscapability (typically administrators).
Guests never see the button.
The Visual Builder still exposes Show to Author Only, but the Divi 5 renderer does not use that toggle. Visibility is always author or administrator. Use Divi Display Conditions if you need stricter role or status rules beyond author/admin.
Loop and Theme Builder targeting
When the module sits in a loop or Theme Builder layout, it resolves the post to edit/delete from:
- Current singular / queried post
- Loop attributes such as
__loop_post_id/__parent_loop_post_idon the module or ancestors - Compatible loop globals (including Ajax Filter loop post IDs when present)
- Remapping when the immediate context is a Divi Library layout CPT (
et_pb_layout) back to the real singular post
Place the module on the template that represents the content you want users to edit (for example a single product or CPT template), not only on a generic global header unless that header inherits the correct post context.
Examples and common patterns
Example 1: Edit in modal on a single template
- Save your create/edit form as a Divi Library layout.
- On the single template, add Edit Post Button.
- Set Button Action to Edit Post, enable Show in Modal, and choose Modal Form Layout.
- Optionally enable Reload Page After Save.
Example 2: Delete with redirect
- Set Button Action to Delete Post.
- Enter a clear Delete Confirmation Message.
- Set Redirect URL After Delete to a safe destination (for example the archive or account page).
Pitfalls and limits
The button does not appear for guests, or for logged-in users who are neither the author nor an administrator.
Limitations:
- Requires a working create/edit form (page or modal layout) with correct field mapping.
- Edit page redirects fail when the selected page does not contain the expected form.
- Loop placement without a resolvable post ID will not target the intended entry.
Related links
- Edit post feature guide — End-to-end Theme Builder workflow
- Create Post / Page / CPT form — Create forms used for editing
- Create Product form — Product create/edit mapping
- Form module reference — Form settings used by the edit layout
What's Next
- Edit post — Set up the full edit/delete workflow
- Field mapping — Control which values save on edit
- Form module reference — Configure the edit form itself
- Modules overview — Other Form Builder modules