Display Custom Post Type Fields

Custom fields are saved in the post_meta table. In your query you got the post title and post ID, so now you have to get post meta.

Use:

<?php
get_post_meta( get_the_ID(), '_location', true );
?>

same for the rest of your custom fields only ‘_location’ will change according to field you are getting.
Read more about post meta here

Leave a Comment