Skip to content

Commit

Permalink
Merge pull request #85 from thenewinquiry/0.7.17
Browse files Browse the repository at this point in the history
For featured post, prefer ordering: subhead->seo->excerpt
  • Loading branch information
frnsys authored Aug 24, 2017
2 parents a35d4c0 + c6a66c6 commit 07db317
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme URI: https://github.com/misfist/tni-theme
Tags: Blog, Magazine
Requires at least: 4.5.0
Tested up to: 4.8
Version: 0.7.16
Version: 0.7.17
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -13,6 +13,9 @@ Custom theme for The New Inquiry, based on Gridbox theme.

== Changelog ==

== 0.7.17 August 23, 2017 ==
* Change preference for featured post subhead

== 0.7.16 August 20, 2017 ==
* Remove box shadow from featured post image

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Description: Custom theme for The New Inquiry.
Author: Pea
Author URI: https://github.com/misfist
Template: gridbox
Version: 0.7.16
Version: 0.7.17
Text Domain: tni
*/
17 changes: 11 additions & 6 deletions template-parts/content-featured.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@
</header><!-- .entry-header -->

<div class="entry-content entry-excerpt clearfix">
<?php $seo_text = get_post_meta( $post->ID, 'seo_description', true ); ?>
<?php if( !empty( $seo_text ) ) : ?>
<?php esc_html_e( $seo_text ); ?>
<?php else : ?>
<?php tni_custom_excerpt( null, 18 ); ?>
<?php endif; ?>
<?php $subhead = get_post_meta( $post->ID, 'post_subhead', true ); ?>
<?php if( !empty( $subhead ) ) : ?>
<?php echo $subhead; ?>
<?php else : ?>
<?php $seo_text = get_post_meta( $post->ID, 'seo_description', true ); ?>
<?php if( !empty( $seo_text ) ) : ?>
<?php esc_html_e( $seo_text ); ?>
<?php else : ?>
<?php tni_custom_excerpt( null, 18 ); ?>
<?php endif; ?>
<?php endif; ?>
</div><!-- .entry-content -->

</div>
Expand Down

0 comments on commit 07db317

Please sign in to comment.