<header class="entry-header">
            <h2 class="entry-title"><?php 
        the_title();
        ?>
</h2>            
		    <?php 
        colabs_post_meta();
        ?>
          </header>
            
          <figure class="entry-media">
			<?php 
        $single_top = get_post_custom_values("colabs_single_top");
        if ($single_top[0] != '' || $single_top[0] == 'none') {
            if ($single_top[0] == 'single_video') {
                $embed = colabs_get_embed('colabs_embed', 400, 231, 'single_video', $post->ID);
                if ($embed != '') {
                    echo '<div class="single_video">' . $embed . '</div>';
                }
            } elseif ($single_top[0] == 'single_image') {
                colabs_image('width=620&link=img');
            }
        }
        ?>
          </figure><!-- .entry-media -->
          
          <div class="entry-content">
			<?php 
        the_content();
        ?>
			<?php 
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Video Posts', 'colabsthemes') : $instance['title']);
        $limit = $instance['limit'];
        $cat_id = $instance['cat_id'];
        $tag = $instance['tag'];
        $width = $instance['width'];
        $height = $instance['height'];
        if (!empty($tag)) {
            $myposts = get_posts("numberposts={$limit}&tag={$tag}");
        } else {
            $myposts = get_posts("numberposts={$limit}&cat={$cat_id}");
        }
        if (empty($limit)) {
            $limit = 10;
        }
        if (empty($width)) {
            $width = 300;
        }
        if (empty($height)) {
            $height = 182;
        }
        $post_list = '';
        $count = 0;
        $active = "active";
        $display = "";
        echo $before_widget;
        echo $before_title . $title . $after_title;
        ?>
    <div class="clear"></div>
    <?php 
        if (isset($myposts)) {
            foreach ($myposts as $mypost) {
                $embed = colabs_get_embed('colabs_embed', $width, $height, 'widget_video', $mypost->ID);
                if ($embed) {
                    $count++;
                    if ($count > 1) {
                        $active = '';
                        $display = "style='display:none'";
                    }
                    ?>
					<div class="widget-video-unit" <?php 
                    echo $display;
                    ?>
 >
					<?php 
                    echo '<h6><a href="' . get_permalink($mypost->ID) . '" title="' . __('Read Article', 'colabsthemes') . '">' . get_the_title($mypost->ID) . "</a></h6>\n";
                    echo $embed;
                    $post_list .= "<li class='{$active}'><a href='#'>" . get_the_title($mypost->ID) . "</a></li>\n";
                    ?>
					</div>
					<?php 
                }
            }
        }
        ?>
    <ul class="widget-video-list">
    	<?php 
        echo $post_list;
        ?>
    </ul>

    <?php 
        echo $after_widget;
    }
Exemple #3
0
    <div class="main-content column col8">
      <article <?php 
post_class('entry-post');
?>
>
        <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $content = '';
        $check_src = '';
        $meta = get_the_title();
        $single_top = get_post_custom_values("colabs_single_top");
        if ($single_top[0] != '' || $single_top[0] == 'none') {
            if ($single_top[0] == 'single_video') {
                $embed = colabs_get_embed('colabs_embed', '626', '350', 'single_video', $post->ID);
                if ($embed != '') {
                    $content .= '<div>' . $embed . '</div>';
                }
            } elseif ($single_top[0] == 'single_image') {
                $content .= '
						  <a href="' . colabs_image('link=url&return=true') . '" title="' . $meta . '"class="grouped" rel="lightbox">
						    ' . colabs_image('width=626&link=img&return=true') . '
						  </a>';
                $check_src = colabs_image('link=url&return=true');
            }
        }
        $attachments = get_children(array('post_parent' => get_the_ID(), 'numberposts' => 100, 'post_type' => 'attachment', 'post_mime_type' => 'image'));
        if (!empty($attachments)) {
            $count = 0;
            foreach ($attachments as $att_id => $attachment) {
Exemple #4
0
				<span><i class="icon-comments"></i><a class="comment-count" href="<?php 
        comments_link();
        ?>
" title=""><?php 
        comments_number(__('0 Comment', 'colabsthemes'), __('1 Comment', 'colabsthemes'), __('% Comments', 'colabsthemes'));
        ?>
</a></span>
			</p>
    </header>

		<div class="entry-media">
			<?php 
        $single_top = get_post_custom_values("colabs_single_top");
        if ($single_top[0] != '' || $single_top[0] == 'none') {
            if ($single_top[0] == 'single_video') {
                $embed = colabs_get_embed('colabs_embed', 664, 350, 'single_video', $post->ID);
                if ($embed != '') {
                    echo $embed;
                }
            } elseif ($single_top[0] == 'single_image') {
                colabs_image('width=664');
            }
        }
        ?>
		</div>

		<div class="entry-content">
			<?php 
        the_content();
        ?>
			<div class="entry-tags"><?php