Custom Post Types

edited November 2014 in Theme support
Hi, 
I'm using a recipe Plugin that creates has a custom post type called recipes. I've worked with their support to get this integrated into Betheme but i'm wondering if there is any documentation from Betheme on how what the best method to include a custom post type to work with this theme. 2 issues i'm still struggling with :

1. Getting the featured image to appear on the post
2. getting the custom post type to adhere fully to the theme layout (i.e. i can't get the sidebar layout to appear on recipe posts)

here's what i've done so far;

sidebar.php 
LINE 11 - Show sidebar for posts and recipes 
FROM 
if( get_post_type()=='post' && is_single() && mfn_opts_get('single-sidebar') ){

TO 
if( (get_post_type()=='post' || get_post_type()=='recipe') && is_single() && mfn_opts_get('single-sidebar') ){

functions\theme-head.php 
LINE 506 - Show sidebar for posts and recipes 
FROM 
if( get_post_type()=='post' && is_single() && mfn_opts_get('single-layout') ){

TO 
if( (get_post_type()=='post' || get_post_type()=='recipe') && is_single() && mfn_opts_get('single-layout') ){

functions\meta-post.php 
LINE 126 - Duplicate to add post options metaboxes to recipes as well 
FROM 
function mfn_post_meta_add() { 
global $mfn_post_meta_box; 
add_meta_box($mfn_post_meta_box['id'], $mfn_post_meta_box['title'], 'mfn_post_show_box', $mfn_post_meta_box['page'], $mfn_post_meta_box['context'], $mfn_post_meta_box['priority']); 
}

TO 
function mfn_post_meta_add() { 
global $mfn_post_meta_box; 
add_meta_box($mfn_post_meta_box['id'], $mfn_post_meta_box['title'], 'mfn_post_show_box', $mfn_post_meta_box['page'], $mfn_post_meta_box['context'], $mfn_post_meta_box['priority']); 
add_meta_box($mfn_post_meta_box['id'], $mfn_post_meta_box['title'], 'mfn_post_show_box', 'recipe', $mfn_post_meta_box['context'], $mfn_post_meta_box['priority']); 
}


 includes/content-single.php file on line 17 and change from:

if( ! mfn_post_thumbnail( get_the_ID() ) ) $classes[] = 'no-img';

to:

if( ! mfn_post_thumbnail( get_the_ID() ) || get_post_type( get_the_ID() ) == 'recipe' ) $classes[] = 'no-img';


is there anything else i should do to make this work? 


Comments

Sign In or Register to comment.