how to use get_the_date
-
I’m trying to get the publish date of the page to display with the title but all thats coming up is this “%A %B %e%q, %Y”. Obviously the date isn’t being properly retrieved. Heres some of my code:
<?php $mypages = get_pages( $args ); foreach( $mypages as $post ) : setup_postdata($post); ?> <?php if (has_post_thumbnail( $post->ID ) ); ?> <?php $date = get_the_date( $d ); ?> <div id="news"> <div class="news_excerpt"> <a href="<?php echo get_page_link( $page->ID ); ?>"><h2><?php the_title(); ?></h2></a><h3><?php echo $date; ?></h3>
the page: https://occa-art.com/cai-yuan/news/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how to use get_the_date’ is closed to new replies.