Example #1
0
    function block($instance)
    {
        extract($instance);
        switch ($layout) {
            case '2col':
                $span = 'span6';
                $imagesize = 'tb-860';
                $counter = '2';
                $videoheight = '195';
                break;
            case '3col':
                $span = 'span4';
                $imagesize = 'tb-360';
                $counter = '3';
                $videoheight = '245';
                break;
            case '4col':
                $span = 'span3';
                $imagesize = 'tb-360';
                $counter = '4';
                $videoheight = '145';
                break;
            default:
                $span = 'span3';
                $imagesize = 'tb-360';
                $counter = '4';
                $videoheight = '145';
                break;
        }
        ?>

	<div id="blog-updates">

		<div class="row-fluid">

		<?php 
        $count = 1;
        query_posts('showposts=' . $entries . '&post_type=post');
        ?>

		<?php 
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
	
			
			<div class="<?php 
                echo $span;
                ?>
 well well-small">

				<?php 
                $id = get_the_ID();
                $temp = get_post_meta($id, '_mpt_post_select_temp', true);
                if ($temp == 'image-carousel') {
                    mpt_load_image_carousel($id, $imagesize);
                } else {
                    if ($temp == 'video') {
                        mpt_load_video_post($id, $videoheight);
                    } else {
                        mpt_load_featured_image($id, $imagesize);
                    }
                }
                ?>
				
				<a href="<?php 
                the_permalink();
                ?>
"><h3 class="post-title"><?php 
                the_title();
                ?>
</h3></a>
				<p class="post-meta">Posted By <?php 
                the_author();
                ?>
 on <?php 
                the_date();
                ?>
</p>
				<?php 
                if (!empty($excerpt) || $excerpt == '0') {
                    ?>
					<p><?php 
                    the_excerpt_max_charlength(esc_attr($excerpt));
                    ?>
</p>
				<?php 
                }
                ?>
			</div>

			<?php 
                if ($count == $counter) {
                    ?>
				</div>
				<div class="row-fluid">
				<?php 
                    $count = 0;
                    ?>
			<?php 
                }
                ?>

			<?php 
                $count++;
                ?>
	

		<?php 
            }
        }
        ?>

		<?php 
        wp_reset_query();
        ?>

		</div>

	</div>

	<?php 
    }
Example #2
0
									<?php 
$temp = get_post_meta($post->ID, '_mpt_post_select_temp', true);
?>
									<?php 
if (has_post_thumbnail($post->ID) || $temp == 'video') {
    ?>

									<div class="span5">										
										<div class="align-center">
											<?php 
    $id = get_the_ID();
    if ($temp == 'image-carousel') {
        mpt_load_image_carousel($id);
    } else {
        if ($temp == 'video') {
            mpt_load_video_post($id, '195');
        } else {
            mpt_load_featured_image($id);
        }
    }
    ?>
										</div> 								
									</div>

									<?php 
}
?>

									<div class="clear padding10 visible-phone"></div>

									<div class="span<?php 
Example #3
0
								<?php 
        $temp = get_post_meta($post->ID, '_mpt_post_select_temp', true);
        ?>
								<?php 
        if (has_post_thumbnail($post->ID) || $temp == 'video') {
            ?>


								<?php 
            $id = get_the_ID();
            if ($temp == 'image-carousel') {
                mpt_load_image_carousel($id, 'tb-860', true);
            } else {
                if ($temp == 'video') {
                    mpt_load_video_post($id, '300');
                } else {
                    mpt_load_featured_image($id, 'tb-860', true, $btnclass, $iconclass);
                }
            }
            ?>

								<?php 
        }
        ?>
	

								<div class="clear padding20"></div>

								<?php 
        the_content();
Example #4
0
									<?php 
    $temp = get_post_meta($post->ID, '_mpt_post_select_temp', true);
    ?>
									<?php 
    if (has_post_thumbnail($post->ID) || $temp == 'video') {
        ?>

									<div class="span5">										
										<div class="align-center">
											<?php 
        $id = get_the_ID();
        if ($temp == 'image-carousel') {
            mpt_load_image_carousel($id);
        } else {
            if ($temp == 'video') {
                mpt_load_video_post($id);
            } else {
                mpt_load_featured_image($id);
            }
        }
        ?>
										</div> 								
									</div>

									<?php 
    }
    ?>

									<div class="clear padding10 visible-phone"></div>

									<div class="span<?php 
Example #5
0
								<?php 
$temp = get_post_meta($post->ID, '_mpt_post_select_temp', true);
?>
								<?php 
if (has_post_thumbnail($post->ID) || $temp == 'video') {
    ?>
									
								<div class="align-center">
									<?php 
    $id = get_the_ID();
    if ($temp == 'image-carousel') {
        mpt_load_image_carousel($id, 'tb-360');
    } else {
        if ($temp == 'video') {
            mpt_load_video_post($id, '245');
        } else {
            mpt_load_featured_image($id, 'tb-360');
        }
    }
    ?>
								</div>

								<div class="clear padding10"></div> 								

								<?php 
}
?>

								<div class="row-fluid">