I've installed a plugin for Wordpress Titled "CMS Press" onto my Site.
I have created two custom fields within a custom post I've called "The Team"
The code for the page is as follows :
<div class="span16"> <!-- This is column 1 -->
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div class="pagehead"><h2 class="title_page"><?php echo get_post_meta($post->ID, 'title_page', true);?></h2></div>
<div class="span6 subcontent">
<?php
$args = array ('post_type' => 'team');
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?>
<div class="teamsubhead">
<h2 class="team_page"><?php the_title(); ?></h2>
<h3 class="job_title"><?php get_post_meta($post->ID, 'jobtitle', true); ?></h3>
</div>
<?php the_content(); ?>
<?php endforeach; ?>
</div>
<?php endwhile; ?>
</div>
The custom field I created in my custom post is called "jobtitle" I am trying to retrieve that from this line of code
<h3 class="job_title"><?php get_post_meta($post->ID, 'jobtitle', true); ?></h3>
However nothing is getting output at all.
Can someone help me with this. I suspect it may be something to do with the loop and my new query being in a new loop?
Thanks in advance.