Title: Published and Modified Date
Last modified: July 6, 2022

---

# Published and Modified Date

 *  [Atharvan](https://wordpress.org/support/users/atharvan/)
 * (@atharvan)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/published-and-modified-date/)
 * Currently displaying the Published and Modified Date at the same time. Now my
   question is
 * 1. How to hide Modified Date if the same as the Published Date?
    [and] 2. How
   to hide Published Date if different from the Modified Date?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/published-and-modified-date/#post-15804738)
 * Hello [@atharvan](https://wordpress.org/support/users/atharvan/),
 * Please follow your primary topic here:
    [https://wordpress.org/support/topic/add-custom-text-in-single-post-modified-date-meta/](https://wordpress.org/support/topic/add-custom-text-in-single-post-modified-date-meta/)
 * Please open one topic, and if you have additional questions related to that topic,
   you can send a reply on that thread. It will also help forum volunteers maintain
   the forum easier and help us better track topics.
 * Thanks,
    Best Regards
 *  Thread Starter [Atharvan](https://wordpress.org/support/users/atharvan/)
 * (@atharvan)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/published-and-modified-date/#post-15807996)
 * [@skalanter](https://wordpress.org/support/users/skalanter/) i think these 2 
   questions are not same and i don’t want to hijack any other topic for different
   question. I got answer for my question already here [https://wordpress.org/support/topic/add-custom-text-in-single-post-modified-date-meta/](https://wordpress.org/support/topic/add-custom-text-in-single-post-modified-date-meta/)
   and closed as resolved.
 * Do you have any answer for my above question? And thanks for your suggestion.
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/published-and-modified-date/#post-15812692)
 * Hello [@atharvan](https://wordpress.org/support/users/atharvan/),
 * You must write a conditional custom code in the date section to achieve it. Add
   a custom CSS class for your desired condition and then write a custom CSS for
   that class, like display: none.
 * To find the main function of the date for your posts, please read this article:
   
   [https://developer.wordpress.org/reference/functions/get_the_date/](https://developer.wordpress.org/reference/functions/get_the_date/)
   To find the main function for the modified date, please read this article: [https://developer.wordpress.org/reference/functions/the_modified_date/](https://developer.wordpress.org/reference/functions/the_modified_date/)
 * You can learn how to use Chrome Developer Tools or Firefox Developer Tools to
   help you see and test changes to your CSS:
    [https://developers.google.com/web/tools/chrome-devtools/](https://developers.google.com/web/tools/chrome-devtools/)
   [https://developer.mozilla.org/en-US/docs/Tools](https://developer.mozilla.org/en-US/docs/Tools)
   CSS Tutorial: [https://www.w3schools.com/css/](https://www.w3schools.com/css/)
 * Please Note 1: You need to be familiar with PHP code to could write your desired
   customization code.
    Please Note 2: At the bottom of the above article on [https://developer.wordpress.org/](https://developer.wordpress.org/),
   you can find an example, but you should write your custom code.
 * I hope that helps.
 * Best Regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Published and Modified Date’ is closed to new replies.

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

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)

 * 3 replies
 * 2 participants
 * Last reply from: [Shahin](https://wordpress.org/support/users/skalanter/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/published-and-modified-date/#post-15812692)
 * Status: not resolved