Last active
July 9, 2016 14:54
-
-
Save ianthompson/84b31f8240feedb142617c3281f9d486 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$show_thumbs = FLTheme::get_setting('fl-posts-show-thumbs'); | |
?> | |
<article <?php post_class( 'fl-post' ); ?> id="fl-post-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/BlogPosting"> | |
<?php if(has_post_thumbnail() && !empty($show_thumbs)) : ?> | |
<?php if($show_thumbs == 'above-title') : ?> | |
<div class="fl-post-thumb"> | |
<?php the_post_thumbnail('large', array('itemprop' => 'image')); ?> | |
</div> | |
<?php endif; ?> | |
<?php endif; ?> | |
<header class="fl-post-header"> | |
<h1 class="fl-post-title" itemprop="headline"> | |
<?php the_title(); ?> | |
<?php edit_post_link( _x( 'Edit', 'Edit post link text.', 'fl-automator' ) ); ?> | |
</h1> | |
<?php FLTheme::post_top_meta(); ?> | |
</header><!-- .fl-post-header --> | |
<?php if(has_post_thumbnail() && !empty($show_thumbs)) : ?> | |
<?php if($show_thumbs == 'above') : ?> | |
<div class="fl-post-thumb"> | |
<?php the_post_thumbnail('large'); ?> | |
</div> | |
<?php endif; ?> | |
<?php if($show_thumbs == 'beside') : ?> | |
<div class="row"> | |
<div class="col-md-3 col-sm-3"> | |
<div class="fl-post-thumb"> | |
<?php the_post_thumbnail('thumbnail'); ?> | |
</div> | |
</div> | |
<div class="col-md-9 col-sm-9"> | |
<?php endif; ?> | |
<?php endif; ?> | |
<div class="fl-post-content clearfix" itemprop="text"> | |
<?php | |
the_content(); | |
wp_link_pages( array( | |
'before' => '<div class="fl-post-page-nav">' . _x( 'Pages:', 'Text before page links on paginated post.', 'fl-automator' ), | |
'after' => '</div>', | |
'next_or_number' => 'number' | |
) ); | |
?> | |
</div><!-- .fl-post-content --> | |
<?php if(has_post_thumbnail() && $show_thumbs == 'beside') : ?> | |
</div> | |
</div> | |
<?php endif; ?> | |
<!-- display taxonomy --> | |
<div class="fl-post-meta fl-post-meta-bottom"> | |
<div class="fl-post-cats-tags"> | |
<!-- REGIONS --> | |
<p>Posted in <?php | |
$regions = get_the_terms( $post->ID, 'region' ); | |
$regionsCount = count($regions); | |
$regionsCounter = 1; | |
foreach($regions as $region) { | |
echo '<a href="/region/' . $region->slug . '">' . $region->name . '</a>'; | |
echo ($regionsCounter < $regionsCount) ? ', ' : ''; | |
$regionsCounter++; | |
} | |
?> | |
<!-- COUNTRIES --> | |
and tagged <?php | |
$countries = get_the_terms( $post->ID, 'country' ); | |
$countriesCount = count($countries); | |
$countriesCounter = 1; | |
foreach($countries as $country) { | |
echo '<a href="/country/' . $country->slug . '">' . $country->name . '</a>'; | |
echo ($countriesCounter < $countriesCount) ? ', ' : ''; | |
$countriesCounter++; | |
} | |
?></p> | |
</div> | |
</div> | |
<?php // FLTheme::post_bottom_meta(); ?> | |
<?php FLTheme::post_navigation(); ?> | |
<?php comments_template(); ?> | |
</article> | |
<!-- .fl-post --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment