SHARE
TWEET

Untitled

a guest Jul 19th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php $thepostid = get_the_ID();
  2. $sale_price_dates_to = ( $date = get_post_meta( $thepostid, '_sale_price_dates_to', true ) ) ? date_i18n( 'M j Y', $date ) : '';
  3. echo '<div class="endsale">' .'<span>'.'Promo end ' . '</span>'.$sale_price_dates_to .'</div>';
  4. ?>
  5.      
  6. if ( $date = get_post_meta( $thepostid, '_sale_price_dates_to', true ) ) {
  7.     $sale_price_dates_to =
  8.         '<span class="m">' . date_i18n( 'M', $date ) . '</span> ' .
  9.         '<span class="d">' . date_i18n( 'j', $date ) . '</span> ' .
  10.         '<span class="y">' . date_i18n( 'Y', $date ) . '</span>';
  11. } else {
  12.     $sale_price_dates_to = '';
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top