You should be able to display the data mentioned in your question.
// use within loop
echo get_post_meta( $post -> ID, '_listing_overview_content_key', true );
Example:
/**
* Setup query to show the 'car_listing' post type with '8' posts.
* Output is title with excerpt, Listing Overview, Fuel Type an Listing Category.
*/
$args = array(
'post_type' => 'car_listing',
'post_status' => 'publish',
'posts_per_page' => 8,
'orderby' => 'title',
'order' => 'ASC',
);
// get posts
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<article>
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
<h3>Listing Overview:</h3>
<p>
<?php echo get_post_meta( $post -> ID, '_listing_overview_content_key', true ); ?>
</p>
<?php the_terms( $post->ID, 'fuel_type', '<br>Fuel Type: ', ' , ' ); ?>
<?php the_terms( $post->ID, 'listing_category', '<br>Listing Category: ', ' , ' ); ?>
</article>
<?php
endwhile;
}
wp_reset_postdata();
I hope this helps.
EDIT
In templates for custom post type ( archive-car-listing.php
and single-car-listing.php
), the code should look like something
if ( have_posts() ) {
while ( have_posts() ) : the_post(); ?>
<article>
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
<h3>Listing Overview:</h3>
<p>
<?php echo get_post_meta( $post->ID, '_listing_overview_content_key', true ); ?>
</p>
<?php the_terms( $post->ID, 'fuel_type', '<br>Fuel Type: ', ' , ' ); ?>
<?php the_terms( $post->ID, 'listing_category', '<br>Listing Category: ', ' , ' ); ?>
</article>
<?php
endwhile;
}