ThemeShaper Forums » Thematic


changing date format

(3 posts)
  • Started 10 years ago by greyhavns
  • Latest reply from keco86
  • This topic is resolved
  1. I want to change the date format for my post header. currently its set in my preferences at m.d.y but i just want to display in my design date("M d"); = FEB 27

    how do i override thematic's time display function to handle my date.

    function thematic_time_display() {
    $time_display = get_option('date_format');
    // Filters should return correct
    $time_display = apply_filters('thematic_time_display', $time_display);
    return $time_display;
    } // end time_display

    Posted 10 years ago #
  2. i figured it out

    function childtheme_override_postmeta_entrydate(){
    	$today = date("M d");
    	$entrydate .= '<div class="entry-date"><abbr class="published" title="';
    	$entrydate .= get_the_time(thematic_time_title()) . '">';
    	$entrydate .= get_the_time(childtheme_override_time_display());
    	$entrydate .= '</abbr></div>';
    	return apply_filters('thematic_post_meta_entrydate', $entrydate);
    // Filter to create the time url title displayed in Post Header
    function childtheme_override_time_display() {
    	$time_title = 'M d';
    	// Filters should return correct
    	$time_title = apply_filters('thematic_time_title', $time_title);
    	return $time_title;
    } // end time_title
    Posted 10 years ago #
  3. You're brilliant. Now how might one add html code to this bit?
    $time_title = 'M d y';

    Basically I need spans around the month and date and year so that I can style each separately.

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.