Exemple #1
0
<?php

get_header();
?>

<?php 
$post_layout = vw_get_post_layout('blog_post_layout');
if ('full-width-featured-image' == $post_layout) {
    get_template_part('single_full_width_featured_image');
} elseif ('classic-no-featured-image' == $post_layout) {
    get_template_part('single_classic_no_featured_image');
} elseif ('custom-1' == $post_layout) {
    get_template_part('single_custom_1');
} elseif ('custom-2' == $post_layout) {
    get_template_part('single_custom_2');
} else {
    get_template_part('single_classic');
}
?>

<?php 
get_footer();
Exemple #2
0
 function vw_body_class_options($classes)
 {
     // Site layout class
     $site_layout = vw_get_theme_option('site_layout');
     $classes[] = sprintf('vw-site-layout-%s', $site_layout);
     // Logo position class
     $logo_position = vw_get_theme_option('logo_position');
     $classes[] = sprintf('vw-logo-position-%s', $logo_position);
     // Top bar layout class
     $top_bar = vw_get_theme_option('site_top_bar');
     $classes[] = sprintf('vw-site-top-bar-%s', $top_bar);
     // Post layout class for single post page
     if (is_single()) {
         $post_layout = vw_get_post_layout();
         $classes[] = sprintf('vw-post-layout-%s', $post_layout);
     }
     if (is_page()) {
         if (has_post_thumbnail(get_queried_object_id())) {
             $classes[] = 'vw-page-has-thumbnail';
         }
     }
     return $classes;
 }