use previous post as a template

Support MB Frontend Submission use previous post as a template

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32983
    jimjim
    Participant

    Process :
    open the template post, Modify data, submit.
    create new post and submit Modified data without change template data.

    Maybe I can use hook "rwmb_frontend_after_process".
    How to create new post and copy data to new post?

    #32987
    Long NguyenLong Nguyen
    Moderator

    Hi Jim,

    Do you mean to use the data of the previous post as the default data of the new post? It's not possible to do with the plugin MB Frontend Submission.

    #32994
    jimjim
    Participant

    Does metabox or wordpress have a function to create a new post in the hook?

    #33001
    Long NguyenLong Nguyen
    Moderator

    Hi Jim,

    You can use the WordPress function wp_insert_post() to create posts https://developer.wordpress.org/reference/functions/wp_insert_post/

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