[Renew] Date format of comments

Hi there,

It looks like the date format for the comments is hard coded in the Renew stack. The date on blog posts automatically uses the format defined in the WordPress settings. But the date on comments is always the same: MM.DD.YYYY

How can I change that? And do you already have this on your roadmap? It’s a minor, but annoying bug :slight_smile:

By the way: The problem only exists with the Renew stack. All others are working fine.

Thanks and best regards,
Michael

Hello,

Thank you for writing in!

You can change the date format going to Dashboard > Settings > General > Date format

Thanks for the reply.

That is exactly my point: In the Renew stack, the comments don’t use the date format from the WordPress settings. They are always MM.DD.YYYY

See here for example: http://x.webdesign-projekte.ch/standard-post-no-featured-image/

The date format for the blog post is correct (“24. Februar 2016”), but the date format of the comments is wrong (“02.24.2016”).

And as I said, if I switch to Integrity, Icon or Ethos, it’s working. Only in Renew it’s not working.

So I’m pretty sure that’s a bug which should be fixed :slight_smile:

Thanks and best regards,
Michael

Hi Michael,

You can modify x_renew_entry_meta() function. We can find it on renew.php file here: \wp-content\themes\x\framework\functions. Copy the function on your child theme functions.php file. Look for the following part:

//
// Date.
//

$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() )
);

Update it accordingly. See this guide for date formats: http://php.net/manual/en/function.date.php

Hope this helps.

Hi Lely,

I’m sorry, but that’s not correct. But it helped me to find the real solution :slight_smile:

Yes, it is in this file: \wp-content\themes\x\framework\functions\renew.php

But it’s in the function x_renew_comment()

To be more exact: On line 215 instead of
get_comment_date( 'm.d.Y' ),
it should simply be
get_comment_date(),

Now the default date format of the WordPress settings will be used.

Can you please confirm that this bug is “officially” captured and will be fixed in a future update?

Thanks a lot and best regards,
Michael

1 Like

Hi Michael,

That is actually intentional as we have designed it to be that way for renew stack.

Though I will forward this for review.

Thanks