I know that this is such a basic question but I have very little Wordpress experience and was hoping I could get some help.
I have a plugin that creates Custom Post Types and Custom Fields. It does both of these things easily, but provides zero support, not even a forum. I created a meta box (meets_on) with three fields.
The first field I created is a multi-check box with day of the week options (called day) and options Sunday, Monday, Tuesday, etc.
The second field I created is a multi-check box with location options (called location) and lists all the options for cities.
The third field I created is a multi-check box with age range options (called age_range) and lists all the options for age range (18-24, 25-30, etc.)
I absolutely cannot figure out how in the world to get these fields to display either on a single post or in the archive loop. I've tried the Wordpress codex suggestions and other answers but nothing is working. Simply nothing displays. I've used get_post_meta, etc.
I just simply need a post to display what I've selected in the back-end; i.e., this group meets on Fridays, in Akron, with an age range of 18-24. From the admin panel, everything is perfect - but I can't get it to display the selections I've made as admin in a single post or category view.
I know this is a long post, but thanks so much for ANY help. I've spent hours trying to figure this out on my own.
Ashley
EDIT:
Here is my code from content.php. My theme basically has a bunch of if:else statements about what kind of entry it is: if is_page, if is_archive, id is_single and this is what I put in if is_single :
<div class="entry-content">
<?php cyberchimps_featured_image(); ?>
<?php the_content( __( 'Continue reading', 'cyberchimps' ) . ' <span class="meta-nav">→</span>' ); ?>
<?php $meta_data = get_post_meta($postid,'meets_on');
// var_dump($meta_data); // debugging
echo $meta_data['day']; ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'cyberchimps' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
EDIT 2:
<?php $postid = get_the_ID(); ?>
<?php
$meta_data = get_post_meta($postid,'meets_on');
// var_dump($meta_data); // debugging
echo $meta_data['day']; ?>
EDIT 3: This code solved the issue:
<?php
$meets_on = get_post_meta( $post->ID, 'meets_on', true );
foreach( $meets_on as $meet){
echo $meet['day'];
} ?>