Short codes in textarea

Support General Short codes in textarea

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36198
    YasmineYasmine
    Participant

    Hello,

    I have made a list of shortcodes to show in textarea:

    [rwmb_meta id="last_name" object_type="user"], [rwmb_meta id="first_name" object_type="user"]. ([rwmb_meta id="academicyear"]). '[rwmb_meta id="post_title"]'. [rwmb_meta id="academicjournal"], [rwmb_meta id="academicjournal_volume_number"], [rwmb_meta id="academicpages"]. [rwmb_meta id="academicdoi"].

    However, the only one that renders is year (a taxonomy). I tried to add object type but it makes no difference. Still it is only year that will show.

    So my question is what am I doing wrong and how do I fix this?

    #36212
    Long NguyenLong Nguyen
    Moderator

    Hi,

    For other custom fields of other object types, you need to add the attribute object_id to the helper shortcode.

    [rwmb_meta id="color" object_id="15" object_type="term"]

    #36215
    YasmineYasmine
    Participant

    Hi just to clarify, I am adding this into an elementor text editor. If I write

    [rwmb_meta id="academicyear"]

    Then it works! But if I write:

    [rwmb_meta id="academicyear" object_type="term"]

    Then it does not work. This is a taxonomy. Am I using the right object type?

    All the rest do not work if I do or do not use object_type. The only one working is year. And all the IDs are correct.

    #36228
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please understand that the attribute object_type="term" is used for the term meta, which means you should use it when you want to display the field value of a term. Read more here https://docs.metabox.io/extensions/mb-term-meta/

    And you should add the object_id attribute if you want to display the value of another object (term/user) on the current post page.

    I suppose that you want to display the field value on a post page, so no need to add the attribute object_type="term". Hope that makes sense.

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