ThemeShaper Forums » Thematic

[closed]

display post tags as a list

(3 posts)
  • Started 9 years ago by Sol
  • Latest reply from Sol
  • This topic is not resolved

Tags:

  1. Sol
    Member

    Can someone help me with changing the tags displayed with each post to a list instead of displaying it with commas in between?

    Posted 9 years ago #
  2. middlesister
    Member

    You have to change the call to for the tags to get_the_tag_list('<ul><li>','</li><li>','</li></ul>');. For thematic, use a filter:

    function childtheme_change_tags() {
    	if (is_single()) {
    	    $tagtext = __(' and tagged', 'thematic');
    	    $posttags = get_the_tag_list("<span class=\"tag-links\"> $tagtext <ul><li>",'</li><li>','</li></ul></span>');
    	} elseif ( is_tag() && $tag_ur_it = thematic_tag_ur_it('</li><li>') ) { /* Returns tags other than the one queried */
    	    $posttags = '<span class="tag-links">' . __(' Also tagged ', 'thematic') . $tag_ur_it . '</li></ul></span> <span class="meta-sep meta-sep-comments-link">|</span>';
    	} else {
    	    $tagtext = __('Tagged', 'thematic');
    	    $posttags = get_the_tag_list("<span class=\"tag-links\"> $tagtext <ul><li>",'</li><li>','</li></ul></span> <span class="meta-sep meta-sep-comments-link">|</span>');
    	}
    	return $posttags;
    }
    add_filter('thematic_postfooter_posttags','childtheme_change_tags');

    I haven't tested this for typos, but I think it should work.

    Posted 9 years ago #
  3. Sol
    Member

    Thank you so much middlesister! :)

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.