Okay
  Public Ticket #1243411
Changing the order of blog dates
Closed

Comments

  •  2
    sancj started the conversation

    Hi,


    How can I change the order of blog date? I thought there was a php file named "post-category-date" where I could customise the blog dates before but now it's gone and can't find where to do that. I'd really appreciate your help!

    Thanks,
    Mari

  • [deleted] replied

    Hi Mari,

    Please read this article for more info Ordering Post Types.

  •  2
    sancj replied

    Hi Ylli,

    Thanks for your reply, but I wanted to change the order of blog dates to Year / Month / Day. Is that possilble? (I tried to change it through Setting but it didn't work.)

    Mari

  •  1,559
    Laborator replied

    Hi Mari,

    Now the whole blog is re-structured and we have changed it to hooks method since this is the way it should be, which is more practical and easier to work with.

    To change the blog date go to kalium/inc/functions/template and edit the blog-template-functions.php, search for kalium_blog_post_date, the part of the date should be shown there.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  • [deleted] replied

    Hi there,

    Can you please add the following code in functions.php (end of file):

    function new_kalium_post_date_format( $format ) {
        return 'Y F d';
    }
    add_filter( 'kalium_post_date_format', 'new_kalium_post_date_format', 10 );

    The format "Y F d" will show the date in this format "2017 July 18" if you want to change to anything else, feel free to edit it. More details about date formatting you can find here.

    This should work for you. Just let me know about the results you get when you apply it.

  •  2
    sancj replied

    Hi Art and Arlind,


    Thank you so much for your advice. It worked perfectly!

    Mari

  • [deleted] replied

    Hi Mari,

    Glad to hear that

    Will set this ticket as solved from here.