function vntd_body_class()
{
    global $post;
    //	if(array_key_exists('vntd_skin', $smof_data)) {
    //		if($smof_data['vntd_skin'] == 'night' || $smof_data['vntd_skin'] == 'dark') {
    //			return 'dark-layout';
    //		}
    //	}
    $return = '';
    if (!is_front_page() && vntd_option('header_title') != 0 && get_post_meta(get_the_ID(), 'page_header', true) != 'no-header' && !is_page_template('template-onepager.php') || is_search() && vntd_option('header_title') != 0) {
        $return .= ' page-with-title';
    }
    return 'header-' . vntd_header_style() . $return;
    return null;
}
 function vntd_header_style()
 {
     global $post;
     $style = 'style-default';
     $style = vntd_option('navbar_style');
     if (!is_search() && !is_archive() && !is_tag()) {
         if (get_post_meta(vntd_get_id(), 'navbar_style', TRUE) && get_post_meta(vntd_get_id(), 'navbar_style', TRUE) != $style && get_post_meta(vntd_get_id(), 'navbar_style', TRUE) != 'default') {
             $style = get_post_meta(vntd_get_id(), 'navbar_style', TRUE);
         }
     }
     return $style;
 }
Ejemplo n.º 3
0
function vntd_blog_post_content($page_layout = NULL, $blog_style = NULL, $grid_style = NULL, $masonry = NULL)
{
    global $post;
    $post_format = get_post_format($post->ID);
    if (!$post_format) {
        $post_format = 'standard';
    }
    $extra_classes = array();
    $excerpt_size = 50;
    if (is_null($grid_style)) {
        $grid_style = vntd_option('blog_grid_style');
    }
    if (is_null($blog_style)) {
        $blog_style = 'classic';
    }
    if ($blog_style == "grid" || $blog_style == "timeline") {
        //echo "yes";
        $extra_classes = array('item', 'vntd-grid-item');
        $excerpt_size = 20;
        if (vntd_option('blog_grid_style') == 'thumb_bg') {
            if (!has_post_thumbnail()) {
                return null;
            }
            $excerpt_size = 18;
        }
    } elseif ($blog_style == "minimal") {
        $excerpt_size = 30;
    }
    $post_media_class = 'post-no-media';
    if (has_post_thumbnail()) {
        $post_media_class = 'post-has-media';
    }
    array_push($extra_classes, $post_media_class);
    if (!$masonry) {
        $masonry = vntd_option('blog_masonry');
        if ($masonry == true) {
            $masonry = 'yes';
        }
    }
    ?>
	
	<div <?php 
    post_class($extra_classes);
    ?>
>
	
		<div class="blog-post-wrap">
	
		<?php 
    if ($blog_style != "classic") {
        vntd_post_meta_extra();
    }
    if (has_post_thumbnail()) {
        vntd_post_media($blog_style, $page_layout, $grid_style, $masonry);
    }
    ?>
	
		
		<div class="blog-post-inner">
			<div class="post-inner">
			<?php 
    if ($blog_style == "grid" && vntd_option('blog_grid_style') == "thumb_bg") {
        vntd_post_meta_extra();
    }
    ?>
			<!-- Post Header -->
			<div class="blog-head">
				<h2 class="blog-post-title">
					<a href="<?php 
    echo get_permalink($post->ID);
    ?>
">
					<?php 
    echo get_the_title($post->ID);
    ?>
					</a>
				</h2>
			</div>
			<!-- Post Header -->
			
			<?php 
    vntd_post_meta();
    ?>
	
			<!-- Post Details -->
			<div class="details">
				<?php 
    if (!is_single()) {
        echo vntd_excerpt($excerpt_size, true);
    }
    ?>
		
			</div>
			<!-- End Post Details -->
			
			</div>
		</div>
		<?php 
    if (is_single()) {
        the_content();
    }
    ?>
		
		</div>
		
	</div>
		
	<?php 
}