• Resolved kim.oj

    (@kimoj)


    Hi, just started using your plugin and seems to work fine for me ??

    But I would like to echo out the expire date on a page (like <?php echo get_the_date(); ?>).

    for example like this
    <?php echo get_the_expiration_date(); ?>

    Is there some way to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kim.oj

    (@kimoj)

    found a code that worked:

    <?php 
    $expires = get_post_meta($post->ID, 'xn-wppe-expiration', true);
    $label = !empty($expires)? date_i18n('j F', strtotime($expires)) : __('never', 'wp-post-expires');
    echo $label;
    ?>

    Thanks for sharing the solution @kimoj. It worked for me as well. ??

    • This reply was modified 7 years, 11 months ago by Fernanda.
    Thread Starter kim.oj

    (@kimoj)

    Marking as resolved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Present the expiry date on page’ is closed to new replies.