Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // vars
- $post_type = get_post_type();
- $fb_sharer = 'https://www.facebook.com/sharer/sharer.php?u=' . wp_get_shortlink();
- $tw_sharer = 'https://twitter.com/home?status=' . wp_get_shortlink();
- ?>
- <li class="tile <?php echo $post_type; ?>">
- <a href="<?php the_permalink(); ?>" class="tile-pad animate-all">
- <table class="media-table"><tr><td class="tile-content v-align">
- <?php if ($post_type == 'galleries' or $post_type == 'videos') {
- if( has_post_thumbnail() ) { the_post_thumbnail('thumbnail', array( 'class' => 'animate-all' ) ); }
- } else { ?>
- <h1><?php the_title(); ?></h1>
- <span class="date"><?php if ($post_type == 'events' ) { the_field('event_date'); } else { the_time('d/m/Y'); } ?></span>
- <?php if( get_field('subheading') and $post_type == 'events' ) { ?><h2><?php the_field('subheading'); ?></h2><?php } ?>
- <?php } ?>
- </td></tr></table>
- </a>
- <a href="#" class="share-this sprite animate-all"></a>
- <div class="share animate-all">
- <a href="<?php echo $fb_sharer; ?>" class="share-article-fb sprite animate-all" target="_blank"></a><!--
- --><a href="<?php echo $tw_sharer; ?>" class="share-article-twitter sprite animate-all" target="_blank"></a>
- </div>
- </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement