Skip to content

Commit

Permalink
better subscriber notice for no subscription date
Browse files Browse the repository at this point in the history
  • Loading branch information
frnsys committed Dec 19, 2017
1 parent 9546d49 commit 7542c70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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.8.4
Version: 0.8.5
Text Domain: tni
*/
6 changes: 5 additions & 1 deletion template-parts/content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@

<div class="entry-content-subscribe">
<?php $subscription_date = get_post_meta( get_the_ID(), 'subscriber_only_date', true ); ?>
<?php _e( 'This essay is available only to subscribers until', 'tni' ); ?> <?php echo date( 'F d, Y', strtotime( $subscription_date ) ); ?>
<?php if ( $subscription_date ) : ?>
<?php _e( 'This essay is available only to subscribers until', 'tni' ); ?> <?php echo date( 'F d, Y', strtotime( $subscription_date ) ); ?>
<?php else : ?>
<?php _e( 'This essay is available only to subscribers, but only for a little while. Please check back soon.', 'tni' ); ?>
<?php endif; ?>
<p class="highlight subscribe"><a href="https://members.thenewinquiry.com"><?php _e( 'Subscribe today for $2', 'tni' ); ?></a></p>
<p><?php _e( 'We\'re grateful for the generous support of our readers.', 'tni' ); ?></p>
</div>
Expand Down

0 comments on commit 7542c70

Please sign in to comment.