ThemeShaper Forums » Thematic

[closed]

thematic_postheader_postmeta display error in Thematic 0.9.6.1

(4 posts)
  • Started 9 years ago by allancole
  • Latest reply from Gigi
  • This topic is not resolved
  1. I’ve noticed something pretty weird in Thematic 0.9.6.1. I’m using a filter to remove all of the default post-meta and replace it with my own markup. It works, but for some reason the post-header-title markup gets pushed below the post-header-meta.

    Here’s my filter.

    //	Custom Post Header Meta
    function childtheme_postheader_postmeta() {
        global $post;
        if (is_page()) { ?>
    
        <?php } else { ?>
        	<div class="entry-meta"><span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time('F j, Y') ?></abbr></span></div>
        <?php } }
    add_filter ('thematic_postheader_postmeta', 'childtheme_postheader_postmeta');

    And here’s what how the markup looks when that filter is in use:

    <div id="post-450" class="hentry more-classes">
    	<div class="entry-meta"><span class="entry-date"><abbr class="published" title="2009-11-07T00:59:34+0000">November 7, 2009</abbr></span></div>
    	<h2 class="entry-title"><a href="http://localhost:8888/?p=450" title="Permalink Title" rel="bookmark">Post Title</a></h2>
    	<div class="entry-content">
    …

    Any ideas as to what could be causing this? I’ve checked out the content-extensions.php file and haven’t been able to figure out what it could be.

    Posted 9 years ago #
  2. Hi Allan,

    try this code:

    //	Custom Post Header Meta
    function childtheme_postheader_postmeta() {
        global $post;
        if (is_page()) { ?>
    
        <?php } else {
        	return '<div class="entry-meta"><span class="entry-date"><abbr class="published" title="' . get_the_time('Y-m-d\TH:i:sO') . '">' . get_the_time('F j, Y') . '</abbr></span></div>';
        } }
    add_filter ('thematic_postheader_postmeta', 'childtheme_postheader_postmeta');

    Chris

    Posted 9 years ago #
  3. That did it! Thanks again Chris.

    Posted 9 years ago #
  4. What code would you insert to declare this to a specific category? Or, better yet, exclude a specific category?

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.