Skip to main content

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

  1. Open a Theme Builder template (or page layout) for the post type.
  2. Add the Edit Post Button module where the button should appear.
  3. Set Button Action to Edit Post or Delete Post.
  4. For edit: choose modal layout or an Edit Form Page that contains your create/edit form.
  5. Save and view a single post as the author (or an administrator) to verify the button appears.

Settings

Content — Action Settings

SettingTypeDefaultDepends OnNotes
Button ActionselectEdit Post-Edit Post or Delete Post
Edit Button Texttext-Edit PostLabel for the edit button
Delete Button Texttext-Delete PostLabel for the delete button
Fullwidth Buttonbooleanoff-Button spans its container
Show to Author Onlyboolean--Present in the builder; see Permissions for actual Divi 5 visibility

Content — Edit Settings

Visible when Button Action is Edit Post.

SettingTypeDefaultDepends OnNotes
Show in Modalbooleanoff-Open the edit form in a modal instead of navigating away
Edit Form Pageselect-Modal offPage that contains the edit/create form; used for redirect
Open in New TabbooleanoffModal offOpens the edit form page in a new tab

Content — Modal Settings

Visible when Show in Modal is on.

SettingTypeDefaultDepends OnNotes
Modal Form Layoutselect-Modal onDivi Library layout that contains the edit form
Modal StyleselectCenterModal onCenter or Side
Reload Page After Saveboolean-Modal onRefresh after a successful modal save so visitors see updated content

Content — Delete Settings

Visible when Button Action is Delete Post.

SettingTypeDefaultDepends OnNotes
Delete Confirmation Messagetext-Delete PostShown before delete
Redirect URL After Deletetext (dynamic)emptyDelete PostLeave empty to stay on the current page; supports dynamic content

Design

SettingTypeDefaultDepends OnNotes
Button Alignmentselect--Left, Center, Right, Justified
Edit / Delete button groupsDivi button--Style edit and delete button appearances
Modal stylingvarious-Modal onOverlay background, close icon/color/size, loading animation color
Standard Divi groupsvarious--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:

  1. The visitor is logged in, and
  2. The visitor is the post author or has the manage_options capability (typically administrators).

Guests never see the button.

Show to Author Only on Divi 5

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_id on 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

  1. Save your create/edit form as a Divi Library layout.
  2. On the single template, add Edit Post Button.
  3. Set Button Action to Edit Post, enable Show in Modal, and choose Modal Form Layout.
  4. Optionally enable Reload Page After Save.

Example 2: Delete with redirect

  1. Set Button Action to Delete Post.
  2. Enter a clear Delete Confirmation Message.
  3. Set Redirect URL After Delete to a safe destination (for example the archive or account page).

Pitfalls and limits

Common pitfall

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.

What's Next