Support » Themes and Templates » [twenty eleven] post date a mess – function not properly working

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


    Forum Moderator

    possibly caused by some missing or wrong options settings in the qtranslate plugin.

    Strange! I have tried to look where the date and time functions are used in 20-11. I wonder whether and where

    if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
     * Prints HTML with meta information for the current post-date/time and author.
     * Create your own twentyeleven_posted_on to override in a child theme
     * @since Twenty Eleven 1.0
    function twentyeleven_posted_on() {
    	printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
    		esc_url( get_permalink() ),
    		esc_attr( get_the_time() ),
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    		esc_html( get_the_author() )

    (code from functions.php of 20-11)

    uses the settings in Settings->General.


    I was not content with 20-11, thus I changed to emptiness as a theme: That resulted in an improved date (still some persent-P symbol) which I do not understand, and more important for me, in sidebars on single post or article pages.

    now the_date() function returns
    19 Aug 2011, 10:19%P

    Does anyone know where the %P comes from?

    Thanks for answers


    Hi Bernhard,

    I don’t know if you’ve already solved your problem or not, but ’cause I’ve faced the same problem, I may suggest a solution to you. As alchymyth already suggested, you may want to check the settings of your qTranslate-Plugin. Simply try out different Date-Options in Advanced Settings.
    For me, I’ve just changed from “emulated-date” to “strftime” and it worked fine.

    And about the ‘%p’ according to PHP-Manual, depend on upper- or lower-case of ‘p’, it gives you back the ‘am/pm’ string. Just take a look at PHP-Manual for Functions: Date-Time for ‘date‘ or ‘strftime‘.


    I got it. You were both correct, but I didnot find the date / strftime settings. Now I looked in the qtranslate settings and found them. Well, I have settled in the meantime for emptiness as theme. That fits also nicely.

    Thanks a lot!


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[twenty eleven] post date a mess – function not properly working’ is closed to new replies.