Display meta box on post
-
Hi,
First off, this looks exactly like the plugin I need. The documentation is great. However, I don’t understand how I’m supposed to display the content of the meta box on my post, or I don’t know how to insert the code properly.
I’ve managed to create a meta box in a file called specifications.php.
In this PHP file, I have defined one field called “length”.
In my post, I gave ‘1m’ as a value for that field.In the documentation, it says that I need to insert that piece of code to display the field on the post :
rwmb_meta( $key, $args = array(), $post_id = null );
Here is the meta part of the code of my post PHP file (with the rwmb_meta code added in the post_info_single part):
<div class="post_meta"> <div class="post_gallery"> <?php get_post_mainimg($post->ID, 220, 580); ?> <div class="clear"></div> </div> <div class="post_info_single"> <?php echo_post_meta_single_info(); ?> <?php echo rwmb_meta('length'); ?> </div><!-- END div.post_info_single --> </div><!-- END div.post_meta -->
Here is what the post looks like: https://imageshack.us/f/203/singlepost.png/
Why doesn’t the field display in the meta info part (right column) ? Did I forget to add something somewhere ? Should I add some code in the functions.php file, besides the call to include specifications.php ?
How can I display the “Length” field on my post ?
Thanks for the help.
- The topic ‘Display meta box on post’ is closed to new replies.