Advertisement
Guest User

Untitled

a guest
Aug 27th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.82 KB | None | 0 0
  1. <div class="boxed-mason col2">
  2.     <div class="content-container <?php if(get_post_meta($post->ID, 'links_advertising', true)): ?>advertisement-bayside<?php endif; ?>">
  3.    
  4.     <?php if(get_post_meta($post->ID, 'links_advertising', true)): ?>
  5.     <?php echo get_post_meta($post->ID, 'links_advertising', true) ?>
  6.     <?php else: ?>
  7.        
  8.         <!-- video embed code -->
  9.         <?php if(get_post_meta($post->ID, 'videoembed_videoembed', true)): ?>
  10.         <div class="featured-media <?php if( has_post_format( 'audio' ) ): ?>audio-embed<?php endif; ?>">
  11.             <div class="video-container"><?php echo get_post_meta($post->ID, 'videoembed_videoembed', true) ?></div>
  12.             <div class="media-overlay">
  13.                 <span class="category-index"><?php the_category(' '); ?></span>
  14.                 <?php if( has_post_format( 'video' ) ): ?> 
  15.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('video'); ?>" class="video-icon">Article</a></span>
  16.                 <?php endif; ?>
  17.                 <?php if( has_post_format( 'audio' ) ): ?>
  18.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('audio'); ?>" class="audio-icon">audio-icon</a></span>
  19.                 <?php endif; ?>
  20.             </div><!-- close .media-overlay -->
  21.             <div class="gradient-overlay"></div>
  22.         </div><!-- close .featured-media -->
  23.         <?php endif; ?>
  24.         <!-- end video embed code -->
  25.        
  26.         <!-- if featured image code -->
  27.         <?php if(has_post_thumbnail()): ?>
  28.         <div class="featured-media">
  29.             <?php if( has_post_format( 'gallery' ) ): ?>
  30.                 <div class="flexslider">
  31.                     <ul class="slides">
  32.                         <?php
  33.                         $args = array(
  34.                             'post_type' => 'attachment',
  35.                             'numberposts' => '-1',
  36.                             'post_status' => null,
  37.                             'post_parent' => $post->ID,
  38.                             'orderby' => 'menu_order',
  39.                             'order' => 'ASC'
  40.                         );
  41.                         $attachments = get_posts($args);
  42.                         ?>
  43.                         <?php
  44.                         if($attachments):
  45.                             foreach($attachments as $attachment):
  46.                         ?>
  47.                         <?php $thumbnail = wp_get_attachment_image_src($attachment->ID, 'progression-thumb-retina'); ?>
  48.                         <?php $image = wp_get_attachment_image_src($attachment->ID, 'full'); ?>
  49.                         <li><a href="<?php echo $image[0]; ?>" rel="prettyPhoto[gallery]" class="hover-gradient"><img src="<?php echo $thumbnail[0]; ?>" alt="gallery-blog" /></a></li>
  50.                         <?php endforeach; endif; ?>
  51.                     </ul>
  52.                 </div>
  53.             <?php else: ?> 
  54.  
  55.             <a href="<?php if(get_post_meta($post->ID, 'links_link_custom', true)): ?><?php echo get_post_meta($post->ID, 'links_link_custom', true) ?><?php else: ?><?php if(get_post_meta($post->ID, 'videoembed_videopopup', true)): ?><?php echo get_post_meta($post->ID, 'videoembed_videopopup', true) ?><?php else: ?><?php the_permalink(); ?><?php endif; ?><?php endif; ?>" class="hover-gradient <?php if(get_post_meta($post->ID, 'videoembed_videopopup', true)): ?>video-pop-up<?php endif; ?>" <?php if(get_post_meta($post->ID, 'videoembed_videopopup', true)): ?>rel="prettyPhoto[gallery]"<?php endif; ?>><?php the_post_thumbnail('progression-thumb-retina'); ?></a><?php endif; ?>
  56.            
  57.        
  58.  
  59.             <div class="media-overlay">
  60.                 <span class="category-index"><?php the_category(' '); ?></span>
  61.                 <?php if( has_post_format( 'gallery' ) ): ?>
  62.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('gallery'); ?>" class="photo-icon">photo-icon</a></span>
  63.                 <?php endif; ?>
  64.                 <?php if( has_post_format( 'video' ) ): ?>
  65.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('video'); ?>" class="video-icon">video-icon</a></span>
  66.                 <?php endif; ?>
  67.                 <?php if( has_post_format( 'link' ) ): ?>
  68.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('link'); ?>" class="link-icon">link-icon</a></span>
  69.                 <?php endif; ?>
  70.                 <?php if( has_post_format( 'audio' ) ): ?>
  71.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('audio'); ?>" class="audio-icon">audio-icon</a></span>
  72.                 <?php endif; ?>
  73.                 <?php if( has_post_format( 'quote' ) ): ?>
  74.                 <span class="post-type-icon"><a href="<?php echo get_post_format_link('quote'); ?>" class="quote-icon">quote-icon</a></span>
  75.                 <?php endif; ?>
  76.                 <?php
  77.                 $format = get_post_format();
  78.                 if ( false === $format ) {
  79.                 ?>
  80.                 <?php
  81.                 $the_cat = get_the_category();
  82.                 $category_name = $the_cat[0]->cat_name;
  83.                 $category_link = get_category_link( $the_cat[0]->cat_ID );
  84.                 ?>
  85.                 <span class="post-type-icon"><a href="<?php echo $category_link ?>" class="article-icon">article-icon</a></span>
  86.                 <?php
  87.                 }
  88.                 ?> 
  89.             </div><!-- close .media-overlay (Icon and link to post type) -->
  90.             <div class="gradient-overlay"></div>
  91.         </div><!-- close .featured-media -->
  92.         <?php endif; ?>
  93.         <!-- end featured image code -->
  94.        
  95.         <div class="featured-summary">
  96.             <h2><a href="<?php if(get_post_meta($post->ID, 'links_link_custom', true)): ?><?php echo get_post_meta($post->ID, 'links_link_custom', true) ?><?php else: ?><?php the_permalink(); ?><?php endif; ?>"><?php the_title(); ?></a></h2>
  97.            
  98.             <?php if( has_post_format( 'quote' ) ): ?>
  99.             <?php the_content('',FALSE,''); ?>
  100.             <?php else: ?> 
  101.                 <?php if( has_post_format( 'audio' ) ): ?>
  102.                 <?php the_content('',FALSE,''); ?>
  103.                 <?php else: ?>
  104.             <?php the_excerpt(); ?>
  105.  
  106.             <?php endif; ?>
  107.             <?php endif; ?>
  108.            
  109.             <div class="meta-data-index">
  110.                 <span class="time-posted-mini"><a href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) ; ?> <?php _e('ago','progression'); ?></a></span><span class="comments-mini"><?php comments_popup_link( '<span class="leave-reply">' . __( '0', 'progression' ) . '</span>', _x( '1', 'comments number', 'progression' ), _x( '%', 'comments number', 'progression' ) ); ?></span>
  111.             </div>
  112.            
  113.         </div><!-- close .featured-summary -->
  114.            
  115.         <?php endif; ?>
  116.     </div><!-- close .content-container -->
  117. </div><!-- close boxed-mason-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement