Can I use Advanced Forms to list a user's posts for editing or deleting?

Created by Phil Kurth, Modified on Mon, 27 Jun, 2022 at 9:15 AM by Phil Kurth

A form can be used to both create and edit posts but Advanced Forms only handles the form itself. Displaying lists of posts is a bit outside the scope of the plugin but can be achieved a number of different ways. The right way for your project will depend on what kind of theme setup you have in place. e.g; if you have a custom coded theme, you have the flexibility of writing queries and template loops to suit the situation but if you are using a page builder, you may have to adapt using the tools provided.

The basic idea, however, is simple: you simply need to configure your theme to show all posts which the user is an author for (AF will automatically make them the author when creating a post) and then on each individual post page you can use the [advanced form ...] shortcode to use the form to edit the current post.

Alternatively, you may wish to have a single page with your form and use a custom URL parameter to pass a post ID to the form. See this article for an example on how you can achieve this result.

What about deleting posts? 

Again, this is something you'll need to build into your theme/implementation but consider using WordPress' get_delete_post_link() function within a query loop.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article