ThemeShaper Forums » Thematic


Filter for post tags

(2 posts)
  • Started 11 years ago by hubs
  • Latest reply from middlesister
  • This topic is not resolved
  1. I would like it to say "Tagged" Instead of "And tagged" in the postfooter part of and individual post. I tried using a filter in my funtions page the looks like the following:

    // Change the way tags show up on a single page
    function childtheme_thematic_postfooter_posttags($postfooter){
    if (is_single()) {
    $tagtext = __('Tagged:', 'thematic');
    $posttags = get_the_tag_list("<span class=\"tag-links\"> $tagtext ",', ','</span>');
    } elseif ( is_tag() && $tag_ur_it = sandbox_tag_ur_it(', ') ) { /* Returns tags other than the one queried */
    $posttags = '<span class="tag-links">' . __(' Also tagged ', 'thematic') . $tag_ur_it . '</span> <span class="meta-sep">|</span>';
    } else {
    $tagtext = __('Tagged:', 'thematic');
    $posttags = get_the_tag_list("<span class=\"tag-links\"> $tagtext ",', ','</span> <span class="meta-sep">|</span>');
    add_action('thematic_postfooter_posttags', 'childtheme_thematic_postfooter_posttags');

    But for some reason it simply stops making all of my tags show up. What am I doing wrong?

    Posted 11 years ago #
  2. middlesister

    Since it is a filter, you need to return the results at the end with

    return $posttags;

    just before the closing angle brackets. And I think it is add_filter and not add_action.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.