This site demonstrates how to use WordPress for CRUD.
- Uses Ninja Forms to display all entries
- Uses Advanced Forms Pro for adding/editing an entry
- Note: I had to use a GeneratePress Elements hook (generate_after_content) to load the shortcode to edit an entry
- Uses custom shortcode in Ninja Form to display delete link (see code below)
- Uses Ninja Forms to display all entries
- Uses Frontend Admin for adding/editing an entry
- Uses custom shortcode in Ninja Form to display delete link (see code below)
Adavanced Forms Pro vs Frontend Admin
Thoughts on using ACF Forms for editing/adding new entries:
- All ACF fields are automatically added
- Only one shortcode is needed per ACF form
- Resource: https://advancedforms.github.io/faq
Thoughts on using Frontend Admin for editing/adding new entries:
- You need to add each ACF field to the form
- More control over the layout of form fields
- You have to create a separate form for adding and editing (redundant work)
Why I used Ninja Forms to display entries
- I can easily add custom columns (such as Delete links or changing the link to edit an entry)
- Requires Ninja Forms Pro for advanced shortcode parameters
- Only con: doesn’t display total rows if there’s only one page of entries
Why I didn’t use other table plugins to display entries
- WPDataTables
- Not easy to add custom columns (such as Delete links)
- I did like the query builder, allowing you to see the actual SQL query
- Posts Table Pro
- Not easy to add custom columns (such as Delete links) – it requires you to add it as a custom field at the post level