Using current post id in shortcodes

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

    Hi,

    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…

    Regards

    Paul

    #1485420
    J. Davis
    Keymaster

    Hi Paul,

    Thanks for your question. You may follow this post to learn how to build a custom template for the accommodation type page https://motopress.com/blog/hotel-booking-styles-addon-single-accommodations/
    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.