Support › General › Short codes in textarea
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?
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"]
Hi just to clarify, I am adding this into an elementor text editor. If I write
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.
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.