Display custom post type in a custom template
-
I’ve used types to create a custom post type “venues” and have added content to it in the form of fields “location” and “description”. But I’m struggling to display the content. I’ve tried following the types instructions and a few support posts but none have helped.
I’ve tried creating a custom template venues.php, using that template to create a new page called Venues with that template. Then within venues.php I add the following code:
echo types_render_field("venues", array("output"=>"html");
but nothing is shown at all. Just a blank space.
I’m wondering if I’m looking for the wrong thing as everything I’ve found describes “displaying custom fields”, but its the whole custom post type (venues) I want to display, not an individual field? How do I display all entries I’ve created for a specific post type, according to the html and css layout I define in venues.php?
Thanks!
- The topic ‘Display custom post type in a custom template’ is closed to new replies.