Custom Post Types
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_
}
TO
function mfn_post_meta_add() {
global $mfn_post_meta_box;
add_meta_box($mfn_post_meta_
add_meta_box($mfn_post_meta_
}
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
because our theme is fully written in accordance to wordpress api, all informations about custom post types you can read at http://codex.wordpress.org/Post_Types