ThemeShaper Forums » Thematic


Adding a div next to entry-title for entry-meta

(2 posts)
  • Started 10 years ago by chris_s
  • Latest reply from diverge
  • This topic is not resolved


  1. I need to add a div next to the post title so I can place the date/time in it over a background image.

    I also need to filter the time stamp. How can I make the date read like the following:

    abbreviated month with the day underneath, no year displayed.

    I have read a number of the post-meta topics, but I have not found one that solves problem and I'm not sure if I should be using childtheme_override functions.

    Posted 10 years ago #
  2. Might depend on -exactly- where you want it.

    thematic_postheader_posttitle() and thematic_postheader_postmeta() are two functions you can filter. If you look at my site, I have what you want in front of the post title so I filtered thematic_postheader_posttitle().

    Here is bits of my code:

    function childtheme_postheader_posttitle()
    	$posttitle = "";
    	if ( $topf_options['displaycalendar'] && ! is_single() )
    		$posttitle .= '<div class="calendar">
    			<span class="month">' . get_the_time('M') . '</span>
    			<span class="day">' . get_the_time('j') . '</span></div>'."\n";
    	$posttitle .= '<h1 class="entry-title">';
    	/* don't show links for the Title on single pages */
    	if ( ! is_single() )
    		$posttitle .= '<a href="';
    		$posttitle .= apply_filters( 'the_permalink', get_permalink() );
    		$posttitle .= '" title="';
    		$posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
    		$posttitle .= '" rel="bookmark">';
    	$posttitle .= get_the_title();
    	if ( !is_single() )
    		$posttitle .= "</a>";
    	$posttitle .= "</h1>\n";
    	return $posttitle;
    add_filter( 'thematic_postheader_posttitle', 'childtheme_postheader_posttitle' );


    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.