$section) { switch ($section){ case 'breadcrumbs': if(!$switch['is_front_page']){ if(get_theme_mod( 'simple_days_breadcrumbs_display','left') !== 'none'){ get_template_part( 'inc/breadcrumbs' ); simple_days_breadcrumb_list(); } } break; case 'title': if($format != 'aside' && $format != 'link' && $format != 'status'){ get_template_part( 'template-parts/post/post',$section ); $vf = 'simple_days_' . $section . '_' . $type; $vf($post_title_effects); } break; case 'date': if(!$switch['is_front_page']){ get_template_part( 'template-parts/post/post',$section ); $vf = 'simple_days_' . $section . '_' . $type; $vf(); } break; case 'author': if(!$switch['is_front_page']){ get_template_part( 'template-parts/post/post',$section ); $vf = 'simple_days_' . $section . '_' . $type; $vf(); } break; case 'pv': if( isset($yahman_addons_option['pv']['enable']) ){ $period = get_theme_mod( 'simple_days_pageview','none'); if( $period != 'none' && ( get_theme_mod( 'simple_days_pageview_logout',false) || is_user_logged_in() ) ){ $count_key = '_yahman_addons_pv_'; $pv_count = get_post_meta($post->ID, $count_key.$period, true); if($pv_count != ''){ echo '
'. $pv_count .'
'; } } } break; case 'thumbnail': if(has_post_thumbnail()){ get_template_part( 'template-parts/post/post',$section ); $vf = 'simple_days_' . $section . '_' . $type; $vf($format,$post_title_effects); } break; case 'content': echo '
'; the_content(); echo '
'; break; case 'widget_1': case 'widget_2': case 'widget_3': case 'widget_4': case 'widget_5': if($type === 'post'){ $widget_name = 'post_'.$section; }else{ $widget_name = 'page_'.$section; } if ( is_active_sidebar( $widget_name ) ) : ?> 0 ) ); if(!empty($judge)){ get_template_part( 'template-parts/post/post',$section ); } break; case 'cta': if(!$switch['is_front_page'] && function_exists( 'yahman_addons_cta_social' )){ $result = false; if($type=='post'){ if( isset($yahman_addons_option['cta_social']['post']) )$result = true; }else{ if( isset($yahman_addons_option['cta_social']['page']) )$result = true; } if($result){ echo yahman_addons_cta_social(); } } break; case 'share': if(!$switch['is_front_page'] && function_exists( 'yahman_addons_social_share' )){ $result = false; if($type=='post'){ if( isset($yahman_addons_option['share']['post']) )$result = true; }else{ if( isset($yahman_addons_option['share']['page']) )$result = true; } if($result){ echo yahman_addons_social_share(); } } break; case 'author_profile': if(!$switch['is_front_page']){ $result = false; if($type=='post'){ if(get_theme_mod( 'simple_days_posts_author_profile',true))$result = true; }else{ if(get_theme_mod( 'simple_days_page_author_profile',false))$result = true; } if($result){ get_template_part( 'template-parts/post/author','profile' ); simple_days_author_profile(); } } break; case 'related': if(!$switch['is_front_page'] && function_exists( 'yahman_addons_related_post' ) ){ if($type === 'post'){ echo yahman_addons_related_post($type); }elseif($pwcat){ echo yahman_addons_related_post($type); } } break; case 'category': if(!$switch['is_front_page']){ $result = false; if($type=='post'){ $result = true; $category_icon = get_theme_mod( 'simple_days_posts_category_icon','fa-folder-o'); $categories = get_the_category(); }else{ if($pwcat){ $get_page_id = get_the_ID(); $categories = get_the_category($get_page_id); if(!empty($categories)){ $result = true; $category_icon = get_theme_mod( 'simple_days_page_category_icon','fa-folder-o'); } } } if($result){ echo '
'; foreach($categories as $category) { echo ''. esc_html($category->cat_name). ''; } echo '
'; //the_category(' '); } } break; case 'tag': if(!$switch['is_front_page']){ $result = false; if($type=='post'){ if(has_tag())$result = true; $tag_icon = get_theme_mod( 'simple_days_posts_tag_icon','fa-tag'); }else{ if(has_tag() && $pwcat )$result = true; $tag_icon = get_theme_mod( 'simple_days_page_tag_icon','fa-tag'); } if($result){ echo '
'; $tags = get_the_tags(get_the_ID()); foreach($tags as $tag){ echo ''; } echo '
'; } // the_tags(' ', ''); } break; case 'pagenation': if(!$switch['is_front_page']){ get_template_part( 'template-parts/post/post',$section ); } break; case 'comment': if(!$switch['is_front_page']){ if ( comments_open() || get_comments_number() ){ comments_template(); } } break; default: } }//end foreach }