Shortcode not working for data from setting page

Support MB Settings Page Shortcode not working for data from setting pageResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24319
    David KraljicDavid Kraljic
    Participant

    Hi
    I have created a settings page. It has several fields one of which has id "hcb_businessname"

    I tried to place that on a page using a shortcode via a Beaver Builder text box [rwmb_meta id="hcb_businessname"] and nothing shows up.

    Any ideas as to what I am doing wrong?

    #24320
    David KraljicDavid Kraljic
    Participant

    I wonder, since post id is optional - if post id is not included then it uses the current post. Since this is data from the setting page it wouldn't be present in a post. So for data from a settings page there must be some other parameter to pass in the shortcode which tells to grab data from settings not post?

    #24335
    Long NguyenLong Nguyen
    Moderator

    Hi David,

    You can try to use this shortcode to get the field value of a settings page:

    [rwmb_meta id="field_id" object_type="setting" object_id="option_name"]

    #24347
    David KraljicDavid Kraljic
    Participant

    thank you. When placing this on let's say - the home page - what would the object id be? The home page's post id? If so, how would you use the setting shortcode in something like a footer where the object id is different everytime?

    #24348
    David KraljicDavid Kraljic
    Participant

    nevermind - got it. 🙂

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