WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to use get_the_date (3 posts)

  1. lizzmo
    Member
    Posted 2 years ago #

    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/

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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...

  3. lizzmo
    Member
    Posted 2 years ago #

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

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

Topic Closed

This topic has been closed to new replies.

About this Topic