Support » Themes and Templates » how to use get_the_date

  • Resolved lizzmo

    (@lizzmo)


    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: http://occa-art.com/cai-yuan/news/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    have a close look into the settings and options of your qtranslate plugin.

    I don’t remember the exact fix, but it has to do with some settings…

    Thanks so much!! I never would have found that!

    I had to select “use strftime instead of date” in the advanced settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to use get_the_date’ is closed to new replies.