function post_template_meta_box($post) { if ( 'portfolio' == $post->post_type && 0 != count( get_portfolio_templates() ) ) { wp_nonce_field( basename( __FILE__ ), 'post_template_class_nonce' ); $template = get_post_meta($post->ID,'_post_template',true); ?> <label class="screen-reader-text" for="post_template"><?php _e('Page Template', 'studiofolio' ) ?></label><select name="post_template" id="post_template"> <option value='default'><?php _e('Default Template', 'studiofolio' ); ?></option> <?php portfolio_template_dropdown($template); ?> </select> <?php } if ( 'post' == $post->post_type && 0 != count( get_post_templates() ) ) { wp_nonce_field( basename( __FILE__ ), 'post_template_class_nonce' ); $template = get_post_meta($post->ID,'_post_template',true); ?> <label class="screen-reader-text" for="post_template"><?php _e('Page Template', 'studiofolio' ) ?></label><select name="post_template" id="post_template"> <?php post_template_dropdown($template); ?> </select> <?php } }
function post_template_meta_box($post) { if ('post' == $post->post_type && 0 != count(get_post_templates())) { $template = get_post_meta($post->ID, '_post_template', true); ?> <label class="screen-reader-text" for="post_template"><?php _e('Post Template'); ?> </label><select name="post_template" id="post_template"> <option value='default'><?php _e('Default Template'); ?> </option> <?php post_template_dropdown($template); ?> </select> <?php } }