wp_Query date format
-
I have a metabox as follows –
array( 'id' => 'released', 'name' => __( 'Release Date', 'textdomain' ), 'type' => 'date', ),
Which outputs the date in the format of Y-m-d even though I have the date format set as d-m-Y in admin ui. I output as follows –
<?php $rel = get_post_meta( get_the_ID(), "released", true ); ?> <?php echo $rel; ?>
My 2 questions are –
How would I output the date format as d-m-Y
And how would I WP_Query to just list the posts of a designated year like 1980.Thanks in advance
Steven
[Moderator note: this is a duplicate of https://www.ads-software.com/support/topic/meta-box-date-format/. Please continue there.]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_Query date format’ is closed to new replies.