I’ve created a custom post type “projects” that has a meta box for additional information (client name, type of project, budget, etc). I’d like to be able to display this information on the front-end.
The custom post type is available to be added to custom menus if desired (‘show_in_nav_menus’ => true), but when you view each project, all you see is the title and the description.
Ideally, I’d like the meta data to show with the title and description in whatever theme that is being used for the site, but I don’t know if that’s possible.
Is there a way to display the meta box information on the front-end without having to either (a) touch the theme files (since themes can change so I don’t want to do that) or (b) calling my own function that returns my own page template for the projects (because then it won’t use the theme that is active)?
Thanks!
ETA – This is all done within my plugin.
Solution:
Inside a function, retrieve meta box field values using get_post_custom_values() and added it to $content passed to the function. Use ‘the_content’ in the add_filter.