Title: PHP &amp; WordPress
Last modified: August 22, 2016

---

# PHP & WordPress

 *  [thundertrax](https://wordpress.org/support/users/thundertrax/)
 * (@thundertrax)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/php-wordpress/)
 * Hi, i’m a beginner in PHP and WordPress and i would appreciate help on project
   i’m working on.
 * Currently i am using the below code to: query a specific post and then echo it’s
   expiration date (expiration date is set through a plugin) in a wordpress site:
 * <?php
    $postid = 3823; $date_format = __( ‘d / m / Y’ ); $expiration_date = get_post_meta(
   $postid, ‘_expiration_date’, true); echo date_i18n( $date_format, strtotime( 
   $expiration_date ) ); ?>
 * This is working fine. What i would like it to do is:
 * – I will have 2 posts, 1 published and one scheduled
    – Query both posts, check
   which is publiched and echo it’s expiration date
 * Thanks,
    Charis

The topic ‘PHP & WordPress’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [thundertrax](https://wordpress.org/support/users/thundertrax/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/php-wordpress/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
