Using current post id in shortcodes

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1483959
    Paul Ryan


    Is it possible to use the current post id in a shortcode rather than having to enter the id= ?

    For example:
    [mphb_rates id=”9373″]
    Can we substitute id=”9373″ with the post id on an a single accommodation post.

    I’m trying to build a template which auto populates all info…



    J. Davis

    Hi Paul,

    Thanks for your question. You may follow this post to learn how to build a custom template for the accommodation type page
    There are used blocks that fetch the ID of the current accommodation type.

    best regards,
    John Davis

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