ThemeShaper Forums » Thematic

[closed]

change "posted in" text

(4 posts)
  • Started 3 years ago by dynamitharry
  • Latest reply from Jonny Janiero
  • This topic is resolved
  1. dynamitharry
    Member

    Hello!

    I have just started to try to build a theme with Thematic, and i want to change the "posted in"-text under a post.

    How do i do that?

    Posted 3 years ago #
  2. you could use the childtheme overide function. paste the following into functions.php (presuming you are using an up-to-date version of thematic)

    '
    //postfooter postcategory
    function childtheme_override_postfooter_postcategory () {
    $postcategory = '<span class="cat-links">';
    if (is_single()) {
    $postcategory .= __('Filed in: ', 'thematic') . get_the_category_list(', ');
    $postcategory .= '</span>';
    } elseif ( is_category() && $cats_meow = thematic_cats_meow(', ') ) { /* Returns categories other than the one queried */
    $postcategory .= __('Filed in: ', 'thematic') . $cats_meow;
    $postcategory .= '</span>';
    } else {
    $postcategory .= __('Filed in: ', 'thematic') . get_the_category_list(', ');
    $postcategory .= '</span>';
    }
    return apply_filters('thematic_postfooter_postcategory',$postcategory);
    } //end
    '

    you will see in the code above, 3 instances changed to 'filed in'
    hope this helps. if so, mark as resolved

    Posted 3 years ago #
  3. dynamitharry
    Member

    cool, thank you, i solved it just before you replied, but in a different way.. don't know what is the best, if you can tell the difference I would be happy!

    function my_postcategory($postcategory) {
    $postcategory = '<span class="cat-links">';
    if (is_single()) {
    $postcategory .= __('In! ', 'thematic') . get_the_category_list(', ');
    $postcategory .= '</span>';
    } elseif ( is_category() && $cats_meow = thematic_cats_meow(', ') ) { /* Returns categories other than the one queried */
    $postcategory .= __('Also posted in ', 'thematic') . $cats_meow;
    $postcategory .= '</span> <span class="meta-sep meta-sep-tag-links">|</span>';
    } else {
    $postcategory .= __('In! ', 'thematic') . get_the_category_list(', ');
    $postcategory .= '</span> <span class="meta-sep meta-sep-tag-links">|</span>';
    }
    return $postcategory;
    }

    add_filter('thematic_postfooter_postcategory', 'my_postcategory');

    Posted 3 years ago #
  4. nice one!
    you have used the traditional function, filter. thematic has introduced overide functions. so no add filter/action needed. i'm knew to them but they seem to working out great. all the available overides can be found in libary/extensions

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.