Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #122261

    Christophe D
    Participant

    Hi !!
    My client want to change the date format.
    Is it possible to change my date format from mm/dd/yyyy to dd/mm/yyyy in news page ?
    Thank you !!
    Christophe D.

    #122263

    Christophe D
    Participant
    This reply has been marked as private.
    #122407

    Cousett
    Member

    You can change the date format by going to the date options under Settings -> General

    /wp-admin/options-general.php

    and change the format to what you need.

    I hope this helps.

    #122820

    Christophe D
    Participant
    This reply has been marked as private.
    #123067

    Paul R
    Moderator

    Hi Chris,

    To be able to change it. You’ll need to set up a child theme first

    http://theme.co/x/member/kb/how-to-setup-child-themes/

    Then add the code below in child theme’s functions.php

    
    if ( ! function_exists( 'x_icon_entry_meta' ) ) :
      function x_icon_entry_meta() {
    
        $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',
          esc_attr( get_the_date( 'c' ) ),
          esc_html( get_the_date( 'd.m.Y' ) )
        );
    
        if ( x_does_not_need_entry_meta() ) {
          return;
        } else {
          printf( '<p class="p-meta">%s</p>',
            $date
          );
        }
    
      }
    endif;