Wordpress metabox of template list in admin site is not display -
below screen shot. metabox of template not working. had used "kallyas" theme. can me?
<?php /* * template name : stack widget */ get_header(); ?> <?php // globals global $content_and_sidebar; $meta_fields = get_post_meta($post->id, 'zn_meta_elements', true); $meta_fields = maybe_unserialize( $meta_fields ); if ( post_password_required() ) { $meta_fields['content_main_area'] = ''; $meta_fields['content_bottom_area'] = ''; $meta_fields['content_grey_area'] = ''; } /*-------------------------------------------------------------------------------------------------- action box area --------------------------------------------------------------------------------------------------*/ if ( isset ( $meta_fields['action_box_area'] ) && is_array ( $meta_fields['action_box_area'] ) ) { zn_get_template_from_area ('action_box_area',$post->id,$meta_fields); } /*-------------------------------------------------------------------------------------------------- content area --------------------------------------------------------------------------------------------------*/ // here check if sidebar enabled $content_css = 'span12'; $has_sidebar = false; $mainbody_css = ''; // check if not page our theme if ( empty ( $meta_fields['page_layout'] ) || empty ( $meta_fields['sidebar_select'] ) ) { if ( $data['page_sidebar_position'] == 'left_sidebar' ) { $content_css = 'span9 zn_float_right zn_content'; $has_sidebar = true; $mainbody_css = 'zn_has_sidebar'; } elseif ( $data['page_sidebar_position'] == 'right_sidebar' ) { $content_css = 'span9 zn_content'; $has_sidebar = true; $mainbody_css = 'zn_has_sidebar'; } } // check if have left sidebar elseif ( $meta_fields['page_layout'] == 'left_sidebar' || ( $meta_fields['page_layout'] == 'default' && !empty ( $data['page_sidebar_position'] ) && $data['page_sidebar_position'] == 'left_sidebar' ) ) { $content_css = 'span9 zn_float_right zn_content'; $has_sidebar = true; $mainbody_css = 'zn_has_sidebar'; } // check if have right sidebar elseif ( $meta_fields['page_layout'] == 'right_sidebar' || ( $meta_fields['page_layout'] == 'default' && !empty ( $data['page_sidebar_position'] ) && $data['page_sidebar_position'] == 'right_sidebar' ) ) { $content_css = 'span9 zn_content'; $has_sidebar = true; $mainbody_css = 'zn_has_sidebar'; } echo '<section id="content">'; if ( $content_and_sidebar ) { while (have_posts()) : the_post(); ob_start(); the_content(); $content = ob_get_clean(); // $content = get_the_content(); //$content_check = apply_filters('the_content', get_the_content()); if ( !empty($content) || ( isset ( $meta_fields['page_title_show'] ) && $meta_fields['page_title_show'] == 'yes' ) || ( isset ( $meta_fields['content_main_area'] ) && is_array ( $meta_fields['content_main_area'] ) && ( isset( $meta_fields['page_builder_layout'] ) && $meta_fields['page_builder_layout'] == 'style1' ) ) ) { $row_margin = 'zn_content_no_margin'; $row_style = 'row'; if ( $content || $has_sidebar ) { $row_margin = ''; } if ( isset( $meta_fields['page_builder_layout'] ) && $meta_fields['page_builder_layout'] == 'style1' ) { $row_style = 'row-fluid zn_def_margin zn_has_sidebar'; } echo '<div class="container">'; echo '<div class="mainbody '.$mainbody_css.'">'; echo '<div class="'.$row_style.' '.$row_margin.'">'; echo '<div class="'.$content_css.'">'; // title check if ( isset ( $meta_fields['page_title_show'] ) && $meta_fields['page_title_show'] == 'yes' ) { echo '<h1 class="page-title">'.get_the_title().'</h1>'; } // page content echo $content; if ( !empty($data['zn_enable_page_comments']) && $data['zn_enable_page_comments'] == 'yes' ) { if ( isset( $data['zn_set_location_page_comments'] ) && (int)$data['zn_set_location_page_comments'] == 0 ) { ?> <!-- disqus comments block --> <div class="disqusform"> <?php comments_template(); ?> </div> <div class="clear"></div> <!-- end disqus comments block --> <?php } } /*-------------------------------------------------------------------------------------------------- start content area --------------------------------------------------------------------------------------------------*/ if ( isset ( $meta_fields['content_main_area'] ) && is_array ( $meta_fields['content_main_area'] ) && ( isset( $meta_fields['page_builder_layout'] ) && $meta_fields['page_builder_layout'] == 'style1' ) ) { zn_get_template_from_area ('content_main_area',$post->id,$meta_fields,true); } echo '</div>'; // start sidebar options // check if not page theme if ( empty ( $meta_fields['page_layout'] ) || empty ( $meta_fields['sidebar_select'] ) ) { if ( $data['page_sidebar_position'] == 'left_sidebar' || $data['page_sidebar_position'] == 'right_sidebar' ) { echo '<div class="span3">'; echo '<div id="sidebar" class="sidebar">'; if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($data['page_sidebar']) ) : endif; echo '</div>'; echo '</div>'; } } // check if have sidebar set in page options elseif ( ( ( $meta_fields['page_layout'] == 'left_sidebar' || $meta_fields['page_layout'] == 'right_sidebar' ) && $meta_fields['sidebar_select'] != 'default' ) || ( $meta_fields['page_layout'] == 'default' && $data['page_sidebar_position'] != 'no_sidebar' && $meta_fields['sidebar_select'] != 'default' ) ) { echo '<div class="span3">'; echo '<div id="sidebar" class="sidebar">'; if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar( $meta_fields['sidebar_select'] ) ) : endif; echo '</div>'; echo '</div>'; } // check if have sidebar set theme's options elseif ( $meta_fields['page_layout'] == 'default' && $data['page_sidebar_position'] != 'no_sidebar' && $meta_fields['sidebar_select'] == 'default' || ( ( $meta_fields['page_layout'] == 'left_sidebar' || $meta_fields['page_layout'] == 'right_sidebar' ) && $meta_fields['sidebar_select'] == 'default' ) ) { echo '<div class="span3">'; echo '<div id="sidebar" class="sidebar">'; if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($data['page_sidebar']) ) : endif; echo '</div>'; echo '</div>'; } echo '</div>'; echo '</div>'; echo '</div>'; } endwhile; } /*-------------------------------------------------------------------------------------------------- start content area --------------------------------------------------------------------------------------------------*/ if ( isset ( $meta_fields['content_main_area'] ) && is_array ( $meta_fields['content_main_area'] ) && ( !isset( $meta_fields['page_builder_layout'] ) || $meta_fields['page_builder_layout'] == 'default' ) ) { echo '<div class="container">'; zn_get_template_from_area ('content_main_area',$post->id,$meta_fields); echo '</div>'; } /*-------------------------------------------------------------------------------------------------- start gray area --------------------------------------------------------------------------------------------------*/ $cls = ''; if ( !isset ( $meta_fields['content_bottom_area'] ) || !is_array ( $meta_fields['content_bottom_area'] ) ) { $cls = 'nomargin'; } if ( isset ( $meta_fields['content_grey_area'] ) && is_array ( $meta_fields['content_grey_area'] ) ) { echo '<div class="gray-area '.$cls.'">'; echo '<div class="container">'; zn_get_template_from_area ('content_grey_area',$post->id,$meta_fields); echo '</div>'; echo '</div>'; } /*-------------------------------------------------------------------------------------------------- start bottom area --------------------------------------------------------------------------------------------------*/ if ( isset ( $meta_fields['content_bottom_area'] ) && is_array ( $meta_fields['content_bottom_area'] ) ) { echo '<div class="container">'; zn_get_template_from_area ('content_bottom_area',$post->id,$meta_fields); echo '</div>'; } echo '</section><!-- end #content -->'; ?> <div class="container"> <?php if ( !empty($data['zn_enable_page_comments']) && $data['zn_enable_page_comments'] == 'yes' ) { if ( isset( $data['zn_set_location_page_comments'] ) && (int)$data['zn_set_location_page_comments'] == 1 ) { ?> <!-- disqus comments block --> <div class="disqusform"> <?php comments_template(); ?> </div> <div class="clear"></div> <!-- end disqus comments block --> <?php } } ?> </div> <?php get_footer(); ?>
it display in admin page
<?php /* * template name: stack widget */ get_header(); ?>
Comments
Post a Comment