ThemeShaper Forums » Thematic


Change the post metadata text for icons?

(6 posts)
  • Started 12 years ago by guillermolopez
  • Latest reply from stengl
  • This topic is resolved


  1. guillermolopez

    How can I change the text in the post metadata (By admin | Published: June 21, 2009 | Edit) for icons? It´s possible?
    I want something like K2 but without text

    Posted 12 years ago #
  2. Hi,

    this is possible. You need to rewrite $postmeta.

    Take the following code, rewrite it to your needs and put it into your child theme's functions.php:

    function my_postheader_postmeta() {
        global $id, $post, $authordata;
        $postmeta = '<div class="entry-meta">';
        $postmeta .= '<span class="meta-prep meta-prep-author">' . __('By ', 'thematic') . '</span>';
        $postmeta .= '<span class="author vcard">'. '<a class="url fn n" href="';
        $postmeta .= get_author_link(false, $authordata->ID, $authordata->user_nicename);
        $postmeta .= '" title="' . __('View all posts by ', 'thematic') . get_the_author() . '">';
        $postmeta .= get_the_author();
        $postmeta .= '</a></span><span class="meta-sep meta-sep-entry-date"> | </span>';
        $postmeta .= '<span class="meta-prep meta-prep-entry-date">' . __('Published: ', 'thematic') . '</span>';
        $postmeta .= '<span class="entry-date"><abbr class="published" title="';
        $postmeta .= get_the_time(thematic_time_title()) . '">';
        $postmeta .= get_the_time(thematic_time_display());
        $postmeta .= '</abbr></span>';
        // Display edit link
        if (current_user_can('edit_posts')) {
            $postmeta .= ' <span class="meta-sep meta-sep-edit">|</span> ' . '<span class="edit">' . $posteditlink . '</span>';
        $postmeta .= "</div><!-- .entry-meta -->\n";
        return $postmeta;


    Posted 12 years ago #
  3. guillermolopez

    Thanks Chris :)

    Posted 12 years ago #
  4. If I cut and paste Chris' code above and change nothing, my posts vanish. If I comment out the $postmeta = apply_filters('thematic_postheader_postmeta',$postmeta); line then the posts show but without the meta data. Is something missing or in error?

    Posted 12 years ago #
  5. It looks like the error has been corrected in Chris's post.
    $postmeta = apply_filters('thematic_postheader_postmeta',$postmeta);
    has been changed to
    return $postmeta;
    and now it should work properly.

    Posted 12 years ago #
  6. stengl

    I want to do exactly what Chris did, but for entry-utility. Ie. I want to change the layout of "Posted in <Categories> | X Comments | Edit" to something like: "Posted in <Categories (depth=2)> and tagged with <all_post_tags> | X Comments | Edit".

    Any ideas?

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.