Title: Modifying Date Format
Last modified: August 22, 2016

---

# Modifying Date Format

 *  Resolved [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/)
 * Hello!
 * I would like to remove the comma from the post date format. I found a support
   thread that suggests creating a child theme, pasting the content from content.
   php into it, and replacing line 22
    from <p class=”post-date”><?php the_time(‘
   j M, Y’); ?></p> to <p class=”post-date”><?php the_time(‘j M Y’); ?></p>.
 * I’ve tried this, but the date does not change. Can someone tell me what I might
   be doing wrong?
 * Thank you!

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/modifying-date-format-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/modifying-date-format-1/page/2/?output_format=md)

 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5787924)
 * Hi donnap. Depending on where the post is being displayed and which post layout
   you are using, you would need to copy content-featured.php and content-standard.
   php to your child theme and make the same change.
 *  Thread Starter [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5787942)
 * Thank you for your advice. I tried your suggestion with no luck. Any other tips?
 * Thank you!
 * Oh, my site is [http://www.jadeacre.com](http://www.jadeacre.com), if you need
   to see it.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5787974)
 * OK, I think the issue is how you’re trying to modify the code. Not sure what 
   the support thread you found said but, when you copy the contents of a php file
   from the parent theme to a child theme, you need to replicate the entire file,
   in the same path, in the child theme. So, instead of pasting the code into your
   custom css, you would need to actually create a file named content.php in your
   child theme, copy the code from the parent file there, and then make your changes
   in the file in the child theme. In reality it’s probably easier to just copy 
   the entire content.php file to your child theme rather than cut-and-paste the
   all the code. This way, when your site runs, it uses whatever files you have 
   in your child theme and ignores the “duplicate” files in the parent theme. So,
   for each of the three content files mentioned above, copy those to your child
   theme and make the date format changes in the child theme files. Then delete 
   all the code you copied into your custom css file. That should fix it.
 *  Thread Starter [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788058)
 * Thank you for your response! I’m not quite sure how to do what you’ve proposed,
   though. It seems like I need to create a new file structure within my child theme,
   which may be beyond my current technical abilities. I just want to remove the
   comma. Is there a simple solution to this, or do you think it involves a lot 
   of coding?
 * Here are the threads I read:
    [https://wordpress.org/support/topic/change-date-format-10](https://wordpress.org/support/topic/change-date-format-10)
 * I also tried to do what Alexander Agnarson suggested, but it crashed my site.
 * I also found this thread:
    [https://wordpress.org/support/topic/alex-please-improve-date-format?replies=6](https://wordpress.org/support/topic/alex-please-improve-date-format?replies=6)
 * I really appreciate any help you can offer!
 *  [MarionFW](https://wordpress.org/support/users/marionfw/)
 * (@marionfw)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788059)
 * I have the same question, and found no solution. I managed to change some of 
   the .php (parent)files involved (knowing that after the next update, I will loose
   these changes, but for the time being I can live with that).
 * Nevertheless, I could not find where to remove the comma in the sidebar widgets
   where the post-name, post-date and image are shown.
 * I too would appreciate if there would be a simple way to just remove this comma
   for good (preferably in the next update).
 * On the whole, I must say I love this theme, this is the only problem I encountered.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788063)
 * As both of the threads that [@donnap](https://wordpress.org/support/users/donnap/)
   posted have said, there are two ways the date is formatted in the theme:
    1. 
   In the single post view, the date takes on the format that you have defined in
   Settings > General > Date Format. To change the date format in the single post
   view, you only need to change the Date Format setting. 2. In every other case,
   including sidebar widgets, the date format is coded in the related php file as
   I mentioned in my first post above. This was done to save space on the page and
   not disrupt the theme layout. To change the date format in these cases, you need
   to copy the related php file to a child theme, then edit the file code to change
   the format, even if the change is as simple as removing the comma. Once you have
   copied the file to your child theme you would use the Admin Appearance > Editor
   to open the file, make the change, and save it. For the sidebar alx-widgets there
   is an extra step of copying a function from the parent theme to your child theme
   functions.php file and making a change. You would use the same editor to change
   the functions.php file. I’d be glad to list the steps involved if you’re interested.
 *  Thread Starter [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788064)
 * I agree that this theme is fantastic!
 * It would be great if the comma was removed in the next theme update. (‘j M, Y’)
   is technically incorrect. The correct date presentation should be (‘j M Y).
 * Example:
    30 JAN 2015 – correct 30 JAN, 2015 – comma mistake.
 * When presented with the month first, the correct date punctuation is Jan 30, 
   2015.
 * This mistake is a bit embarrassing for an English teacher!
 *  Thread Starter [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788065)
 * @dbbrown
 * I would very much appreciate listed steps!
 * I installed the Hueman Child Theme, which is where I’ve been making other minor
   edits to the theme. Is this where I copy the all of the php files (content, content-
   standard, and content-featured)? Or do I create a new child theme and paste these
   php files there? Also, I’m confused if I need to create new, individual “child”
   php files for content.php, content-standard.php, and content-featured.php. If
   so, I’m not sure how to do this.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788067)
 * [@donnap](https://wordpress.org/support/users/donnap/) – You would use your existing
   child theme. For the three main content files (content.php, content-featured.
   php and content-standard.php), you would copy those files from the parent theme
   to your child theme, using FTP or cPanel. Then you make the changes to the date
   format in the child theme files. When the site is generated it will use the files
   it finds in your child theme and ignore the “original” files in the parent theme.
 *  [MarionFW](https://wordpress.org/support/users/marionfw/)
 * (@marionfw)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788070)
 * Hi BDBrown,
    I’m very impressed by your knowhow! Ik hope you can help me out.
   I managed to change the 3 content-.php files earlier, but in view of future updates,
   I now copied these to the child theme.
 * To get the date right in the side bar, I now should alter the functions.php file.
   But I have no idea what part of it: I cannot find a date format in the functions.
   php file, either in the file that already existed in the child-theme or in the
   file of the original theme. Emptying cache did not help.
 * Could you please help out?
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788105)
 * To modify the date in the sidebar widgets:
    1. Copy the alx-____.php widgets 
   you want to use from the parent theme /hueman/functions/widgets/ folder to **
   the same folder** in your child theme. You’ll need to create the folder structure
   in your child theme. It won’t work if you put the widget php files in the child
   theme root folder with the other child theme files like style.css. 2. Change 
   the date formats in the child theme alx-____.php files. 3. Make the updates to
   your child theme functions.php file described in [this thread](https://wordpress.org/support/topic/alx-postsphp-date-format?replies=2).
 *  [MarionFW](https://wordpress.org/support/users/marionfw/)
 * (@marionfw)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788107)
 * Thanks! I just followed the steps you pointed out, and it works. As far as I’m
   concerned, the discussion is closed, but I did’n’t start is, so I just leave 
   it at this.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788114)
 * Glad it worked.
    [@donnap](https://wordpress.org/support/users/donnap/) – if 
   this fixes the question in your original post please mark the topic as resolved.
   Thanks.
 *  Thread Starter [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788119)
 * Thank you bdbrown!! It worked! I appreciate all of your help!
 *  Thread Starter [donnap](https://wordpress.org/support/users/donnapotratz/)
 * (@donnapotratz)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/#post-5788135)
 * Hello there! I reopened this thread because I just found another comma in the
   date format that I’d like to remove, but I know what php file to change. The 
   date appears in the “You may also like”/ Related Posts widget.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/modifying-date-format-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/modifying-date-format-1/page/2/?output_format=md)

The topic ‘Modifying Date Format’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hueman/3.7.27/screenshot.png)
 * Hueman
 * [Support Threads](https://wordpress.org/support/theme/hueman/)
 * [Active Topics](https://wordpress.org/support/theme/hueman/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hueman/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hueman/reviews/)

 * 17 replies
 * 3 participants
 * Last reply from: [donnap](https://wordpress.org/support/users/donnapotratz/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/modifying-date-format-1/page/2/#post-5788137)
 * Status: resolved