Custom Fields
Re-Envisioned
Support MB Settings Page Shortcode not working for data from setting page

  • Creator
    Topic
  • #24319
    Resolved David 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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #24320
    David 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 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 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 Kraljic
    Participant

    nevermind - got it. 🙂

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