Archived topic
Display Meta Data in Custom Post
2 replies · Started by John on October 20, 2016
I am using Generate Press Theme and Premium Plugin.
I created a custom post type 'children'.
The only supports for this post type are title and thumbnail.
I created meta-data for that post type with key:values for age, gender, interests etc.
I created a child-theme for GeneratePress and made a single-children.php and archive-children.php by copying the non-post specific versions from the parent theme.
My Question:
How so I modify these templates or the content.php template to make the stored meta-data for these posts display?
Currently I only get the title and featured image.
Thanks,
John
I am getting the values to show up now using:
<?php echo get_post_meta( the_ID(), 'age', true );?>
I see that there is content.php for the archive template and content-single.php for the single template.
I would like to set the css for only the meta-data these post types.
Any tips?
Thanks again,
John
The element should have a class specific to the post type in if if you check it out using developer tools (right-click > inspect).
That class should allow you to add CSS specific to the post type.
Let me know :)