Title: Date Bars on posts
Last modified: August 31, 2016

---

# Date Bars on posts

 *  Resolved [inmiddleburymagazine](https://wordpress.org/support/users/inmiddleburymagazine/)
 * (@inmiddleburymagazine)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/date-bars-on-posts/)
 * The date bars on the posts show the number of hours/days since posted, rather
   than the date of the post. Is there a way to change this?
    Website: inMiddlebury.
   com

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

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/date-bars-on-posts/#post-7421851)
 * You can make this change in a child theme, so your tweaks won’t be overwritten
   when you update the theme. If you’re new to child themes, you can explore these
   guides:
 * [http://codex.wordpress.org/Child_Themes](http://codex.wordpress.org/Child_Themes)
   
   [https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/](https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/)
   [http://vimeo.com/39023468](http://vimeo.com/39023468)
 * Keeping your theme up-to-date is strongly recommended to ensure you get bug fixes,
   security updates, and updates to keep the theme compatible with WordPress core.
 * Once your child theme is set up, you’ll need to copy the `posted_on()` date function
   from `/inc/template-tags` into your child theme’s `functions.php` file:
 *     ```
       function apostrophe_posted_on() {
       		$human_time = apostrophe_human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) );
       		$regular_time = get_the_time( get_option( 'date_format' ) );
   
       		$output_time = sprintf( '%s <span style="display:none;">%s</span>', esc_html( $human_time ), esc_html( $regular_time ) );
   
       		if ( current_time( 'timestamp' ) > get_the_time( 'U' ) + 60 * 60 * 24 * 14 ) {
       			$output_time = esc_html( $regular_time );
       		}
   
       		printf( '<a class="entry-date published" href="%s">%s</a>', esc_url( get_permalink() ), $output_time ); // WPCS: XSS OK.
       		printf( '<time class="updated" datetime="%s">%s</time>', esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) );
       		printf( '<span class="byline vcard"><a class="url fn n" href="%s">%s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() );
       	}
       // endif;
       ```
   
 * Change this line from:
 * `printf( '<a class="entry-date published" href="%s">%s</a>', esc_url( get_permalink()),
   $output_time ); // WPCS: XSS OK.`
 * to this:
 * `printf( '<a class="entry-date published" href="%s">%s</a>', esc_url( get_permalink()),
   $regular_time ); // WPCS: XSS OK.`
 * That should eliminate the relative dates and give you full dates, no matter when
   something was posted.
 * Let me know how it goes.
 *  Thread Starter [inmiddleburymagazine](https://wordpress.org/support/users/inmiddleburymagazine/)
 * (@inmiddleburymagazine)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/date-bars-on-posts/#post-7421860)
 * Thank you for the information!
 * Based on the images in the theme details, I thought maybe there was something
   that needed to be checked, or unchecked. I am very new to this, and think that
   the fix may be above my current skill set. I’m very happy with the theme so far,
   so I guess I just leave it the way it is for now. Will study-up and try to make
   the changes later.
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/date-bars-on-posts/#post-7421861)
 * OK, sure!
 * For your info, Apostrophe designed to display relative dates for posts up to 
   two weeks old. Posts older than that should display full dates.

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

The topic ‘Date Bars on posts’ is closed to new replies.

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

## Tags

 * [Apostrophe Theme](https://wordpress.org/support/topic-tag/apostrophe-theme/)

 * 3 replies
 * 2 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/date-bars-on-posts/#post-7421861)
 * Status: resolved