ThemeShaper Forums » Thematic

[closed]

Adding Small Images to entry-utility variables?

(2 posts)
  • Started 13 years ago by dhales
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. dhales
    Member

    Hello,

    I'm having a small problem, I'm fairly sure the solution is simple I just can't seem to figure out what's going on. I've created a custom filter modify the position and text of the entry-utility items at the bottom of the posts (tags, categories, etc.)

    I am trying to add a small image to the left of both the category and tag text, but it keeps giving me the error "unexpected T_STRING". This is the code I have.

    function custom_post_footer_category() {
    
        $postcategory = '<span class="cat-links">';
        if (is_single()) {
    		<strong>$postcategory .= __('<img alt="category" src="<?php bloginfo('stylesheet_directory'); ?>/images/category.jpg">Filed Under: ', 'thematic') . get_the_category_list(', ');</strong>
            $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 .= __('Posted in ', 'thematic') . get_the_category_list(', ');
            $postcategory .= '</span> <span class="meta-sep meta-sep-tag-links"></span>';
    	}
    		return $postcategory;
    }
    add_filter('thematic_postfooter_postcategory','custom_post_footer_category');

    Thanks in advance for your assistance.

    Posted 13 years ago #
  2. how about you just do this in CSS?

    .cat-links{
    padding-left: 20px;
    background: url(images/bluestar.png) no-repeat transparent left center;
    }
    Posted 13 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.