Frontend Post Deletion in Bricks

Updated on 20 Aug 2024

This Pro tutorial provides the steps for users (post authors) to delete their posts from the front end in Bricks.

We shall set the delete buttons to only be output for posts that the current user has authored (published).

While it is not mandatory, we shall use BricksExtras' Nestable Table element for quickly generating a dynamic HTML table of posts (can be of those of any post type) using a Bricks' query loop.

Update 1: Added instructions near the end on how to delete the rows without a page reload.

Update 2: Added instructions near the end on how to make the delete buttons appear and work for post authors AND users that can delete others' posts (admins and editors by default).

We are going to

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 537 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Custom Mini Calendar using WordPress REST API

Custom Mini Calendar using WordPress REST API

This Pro tutorial provides the steps to use WordPress REST API to fetch posts of an Event CPT that have the same Event Date custom…
Categories:
Pro
Loading posts on click using WP REST API in Bricks

Loading posts on click using WP REST API in Bricks

This Pro tutorial provides the steps to load the title and excerpt of the post whose title has been clicked from a list of posts.…
Categories: