Save, Edit & Delete Methods WITHOUT Dashboard

Support MB Frontend Submission Save, Edit & Delete Methods WITHOUT Dashboard

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31154
    jmcbadejmcbade
    Participant

    Since I can not use MB "Dashboard" for this project because I need to use "Roles/Capabilities on an archive to process the posts...

    I am NOT asking how to or expect MB to manage Roles.

    What I am thinking is I might just need to use a regular WP archive and then have buttons that lead to forms that do these tasks. The buttons would need to lead to these forms and populate the form with the data from the current post.

    How can I create forms with these three features (may need different forms right) for front end management of these posts?

    Please provide an alternative to MB "Dashboard".

    #31187
    jmcbadejmcbade
    Participant

    If I have an archive listing and in that listing I want to pass the ID to the form on a page page and populate it for editing, what would that shortcode look like?

    May I have an example please?

    #31188
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I think Anh Tran has told you to use the query string to edit a post if the user capability/role can edit it, such as editor.

    You can edit the archive page then add a button with a query string in the loop

    http://siteurl.com/frontend-submit-page-slug/?rwmb_frontend_field_post_id=123
    

    there is no prebuilt shortcode that supports this case. You need to create a custom code to do that.

    Get more details on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#dynamic-population

    #31231
    jmcbadejmcbade
    Participant

    I can't hard code the post ID.

    There is a parameter called "current" Should that work somehow?

    #31243
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can get the post ID dynamically in the loop by using the WordPress function get_the_ID(). Screen record for demo https://share.getcloudapp.com/DOu6nlRq

    Code:
    <?php echo '<a href="http://siteurl.com/frontend-submit-page-slug/?rwmb_frontend_field_post_id=' . get_the_ID() . '">Edit post 12345</a>'; ?>

    Theme: Twenty TwentyOne, file archive.php
    https://github.com/WordPress/twentytwentyone/blob/trunk/archive.php#L26-L29

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.