Advertisement
TheMightyAnt

Jking - content

May 1st, 2015
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.41 KB | None | 0 0
  1. <?php // vars
  2. $post_type = get_post_type();
  3. $fb_sharer = 'https://www.facebook.com/sharer/sharer.php?u=' . wp_get_shortlink();
  4. $tw_sharer = 'https://twitter.com/home?status=' . wp_get_shortlink();
  5. ?>
  6.  
  7. <li class="tile <?php echo $post_type; ?>">  
  8.  
  9.    <a href="<?php the_permalink(); ?>" class="tile-pad animate-all">
  10.    
  11.       <table class="media-table"><tr><td class="tile-content v-align">
  12.      
  13.          <?php if ($post_type == 'galleries' or $post_type == 'videos') {
  14.          
  15.          if( has_post_thumbnail() ) { the_post_thumbnail('thumbnail', array( 'class' => 'animate-all' ) ); }
  16.            
  17.          } else { ?>
  18.      
  19.          <h1><?php the_title(); ?></h1>
  20.          
  21.          <span class="date"><?php if ($post_type == 'events' ) { the_field('event_date'); } else { the_time('d/m/Y'); } ?></span>
  22.          
  23.          <?php if( get_field('subheading') and $post_type == 'events' ) { ?><h2><?php the_field('subheading'); ?></h2><?php } ?>
  24.          
  25.          <?php } ?>
  26.            
  27.      
  28.       </td></tr></table>
  29.      
  30.    </a>
  31.    
  32.    <a href="#" class="share-this sprite animate-all"></a>
  33.    
  34.    <div class="share animate-all">
  35.    
  36.       <a href="<?php echo $fb_sharer; ?>" class="share-article-fb sprite animate-all" target="_blank"></a><!--
  37.       --><a href="<?php echo $tw_sharer; ?>" class="share-article-twitter sprite animate-all" target="_blank"></a>
  38.  
  39.    </div>
  40.    
  41. </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement