Support › Meta Box Template › Show content in frontend
I am not good in PHP so... https://metabox.io/plugins/meta-box-template/
Works great! But how to show the content in the frontend?
Hope to hear.
Thanks for using our plugins, to display field on the frontend, you can follow this guide.
Have a nice day man 🙂
I thought I could design without coding 🙂 ?
"With Meta Box Template, you can create custom meta boxes much more easily, even if you don’t know PHP or coding"
Iam "if you don’t know PHP or coding" 😉
How can I easily display a content box to a single page for example?
I tested this one "If you register single meta box":
What should be the code for that for the frontend?
Is there not a way to put a shortcode or something that just calls the whole metabox?
Hope you can help me out with this.
Yes, we do have shortcode to display on singular pages 🙂
$meta_key is the field ID.
To display post meta on other pages or specify post id meta, you can add post_id attribute, like so:
[rwmb_meta post_id="$post_id" meta_key="$meta_key"][/rwmb_meta]
Shortcodes are clear now 🙂
But if I want to display at, for example, single.php.
What woud be te code to put there? Do I also need to put a code to functions.php?
Sorry, want to learn/understand :).
Can you give me an instruction + code for the example you made for Meta Box Template. In the way I can get it on the frontend by single.php?
So I see What to do :).
Thanks! Also for your patiends and quick responds!
If you want to display meta value in a template file like
single.php, please open that file (not
functions.php) and insert the following code at the place you want to show the value:
echo rwmb_meta( 'FIELD_ID', 'type=FIELD_TYPE' );
Don't forget to change
FIELD_TYPE to your specific field ID and field type.