How to get the post ID from a url

Support MB Frontend Submission How to get the post ID from a urlResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21101
    Jon San RomanJon San Roman
    Participant

    Hi I'm trying to create a grid of properties with an "edit" button.

    The idea is that when I click on the button it opens the MB frontend module and I can edit that post's content. How can i get the post id of that post to add it to the MB post_id field?

    Thanks

    #21107
    Long NguyenLong Nguyen
    Moderator

    Hi Jon,

    In the loop, we can use the function get_the_ID() to get the post ID then pass it to the URL of editing form.

    http://site.com/mb-frontend-submission-page/?rwmb_frontend_field_post_id=POST_ID

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