Custom Post Type Templates
-
I want to create a template within my plugin which will display the entry in a certain way.
I’ve added the template no problem:
add_filter('single_template', 'mjt_class_single_templates'); add_filter('archive_template', 'mjt_class_archive_templates');
however within the template I still want to inherit the theme settings to some extent.
So within my template file I need something like this:
get_header(); while (have_posts() ): the_post(); <!-- inherit stuff from the theme to open the entry--> <!-- do my own formatting of title --> the_title(); <!-- do my own formatting of content --> the_content(); <!-- inherit stuff from the theme to close the entry--> endwhile; get_footer();
I have a feeling I need to do something with get_template_part but … I can’t work out what.
Any help much appreciated everyone.
- The topic ‘Custom Post Type Templates’ is closed to new replies.