Support » Themes and Templates » Matala Theme – Don't react on specifying date format

  • candybutterfly


    Hi there!
    I’m using Matala theme for my blog. The trouble is that on the corner with post date I still may see just a code specifying the date format.
    Here how it looks ->

    The strangest part of it is that if I change the code in any part of functions.php from unspecified get_the_time() to get_the_time( 'M' ) it shows me that M or anything I write there!
    But if keep it empty no matter get_the_time() or get_the_date() it shows full date or month whatever.

    Can anybody help me, please? =3

Viewing 6 replies - 1 through 6 (of 6 total)
  • curtismchale


    You should be using just the_time. get_the_time is meant to return the time for PHP to do something with it while the_time is supposed to display the time. I suppose you could just echo get_the_time but that’s not the right way to do it.



    Nope. It doesn’t show anything at all ->

    Here is the original code. Maybe it may help to help me.

    if ( ! function_exists( 'matala_post_date' ) ) :
     * Prints HTML with meta information for the fancy display of the current post's month and day
    function matala_post_date() {
    	printf( __( '<div class="post-date"><span class="entry-month">%1$s</span><span class="entry-day">%2$s</span></div>', 'matala' ),
    		esc_attr( get_the_time( 'M' ) ),
    		esc_attr( get_the_time( 'j' ) )


    Let me explain again.
    Here is the original code:

    esc_attr( get_the_time( 'M' ) ),
    		esc_attr( get_the_time( 'j' ) )

    And a result of one ->
    We can see M and J in the corner on place where Month and Day should be.

    If I do not specify what I want to see, like this:

    esc_attr( get_the_time() ),
    		esc_attr( get_the_time() )

    Everything works as we wrote, here is the result ->

    If I change tags to the_time, like this:

    esc_attr( the_time() ),
    		esc_attr( the_time() )

    I get empty space ->

    What is not right in that code? Why it doesn’t react when I specify the date format?
    What should I do to make it show me the month and the day as it shown in theme preview? ->
    Please, help me anyone… < . >



    People… =(

    This is my code I had to solve the same problem.

    In Matala theme the functions.php file
    Lines from 299 to 301

    esc_attr( get_the_date( 'j F, Y') ),
    		esc_attr( get_the_date( 'j F, Y') ),
    		esc_html( get_the_date( 'j F, Y') ),

    for the comments

    /* translators: 1: comment author, 2: date and time */
    						printf( __( '%1$s %2$s <span class="says">said:</span>', 'matala' ),
    							sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
    							sprintf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>',
    								esc_url( get_comment_link( $comment->comment_ID ) ),
    								get_comment_time( 'g:ia' ),
    								/* translators: 1: date, 2: time */
    								sprintf( __( '%1$s %2$s', 'matala' ),  get_comment_date( 'F j, Y' ) ,  get_comment_time( 'g:ia' )  )

    … and in qTranslate in advanced settings I have

    Conversión de Fecha / Tiempo Utilizar función de fecha emulada.
    In english something like:
    Conversion of Date / Time Use emulated date function

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Matala Theme – Don't react on specifying date format’ is closed to new replies.