Papuros Video Page

Have you use a magazine WordPress theme from ColorLabs named papuros? If you already use/test that theme, you may found a page template named video page template.

My friend from Indiana, Adam sent me an e-mail several days ago about this theme. What he think at the first time about the video page template is, this page template will displaying all post you have that contain a video embed code. Me too!

When i test this page template, it will displaying all posts you have. Including the post that doesn’t have a video embed code on it. So, what is the purpose of this template? FYI, this theme also have another page template for gallery, the name is gallery page template. The only difference between video page template and gallery page template is the layout and thumbnail size, perfect!

At this tutorial, i want to share to you a tweak to make the real video page template. This tweak will make your video page template displaying only a post that have a video embed code on it (the video embed code is placed at colorlabs image/video settings).

To do this tweak, you can edit a file named template-video.php. Remove all codes you have there and put the code below:

<?php
/* Template Name: Video */
?>

<?php 
$colabs_pagetemplate_settings = array();
$colabs_pagetemplate_settings = maybe_unserialize( get_post_meta($post->ID,'colabs_pagetemplate_settings',true) );

$colabs_gallerycats = isset( $colabs_pagetemplate_settings['colabs_gallerycats'] ) ? $colabs_pagetemplate_settings['colabs_gallerycats'] : array();
$colabs_gallery_perpage = isset( $colabs_pagetemplate_settings['colabs_gallery_perpage'] ) ? (int) $colabs_pagetemplate_settings['colabs_gallery_perpage'] : 12;
?>

<?php get_header(); ?>
    	<div class="main-content">
          <div class="innercontainer">
        	<div class="page-location">
    			<?php colabs_breadcrumbs(array('separator' => '&raquo;', 'before' => false)); ?>
    		</div><!-- .page-location -->
			<div class="featured">            	
				<div class="fea-detail clearfix">
					<div class="fea-side1">
						<h2 class="content-title"><?php the_title(); ?></h2>
					</div><!-- .fea-side1 -->
				</div><!-- .fea-detail -->
			</div><!-- .featured -->            
			
		<?php
	$wp_query = new WP_Query( array(
			'post_type' => 'post',
			'posts_per_page' => $colabs_gallery_perpage,
			'paged' => $paged,
		));
		
	$i=1;
	
	if(have_posts()): ?>
	<div class="video-post">
	<?php
	while(have_posts()): the_post();
	$id = get_the_ID();
	$single_top = get_post_custom_values("colabs_single_top");
	if ($single_top[0]=='single_video') {
	?>
	
	
	<div class="video-content column col6 <?php if(1==$i) echo 'alpha'; if(2==$i)$i=0;?>">
		<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
		<?php colabs_image('width=306&height=200&link=img&play=true'); ?>
		</a>
	<h5 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
	</div>

	
	<?php
	} else {} 
	$i++; endwhile; ?>
	 </div><!-- video-post -->

	<?php else : ?>
		<?php _e('Whoops! There is no property currently.'); ?>
	<?php endif; ?>
	<div class="pagination inline-list column col5 centered">
      	<?php colabs_pagenav(); ?>
    </div><!-- .pagination -->

          </div><!-- .innercontainer -->
        </div><!-- .main-content -->
<?php get_footer(); ?>

And done! That is a video page template should be.

To make sure everything is ok, make sure if you modify this file via FTP. You can find it at directory: wp-content > themes > papuros. enjoy 🙂

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s