ThemeShaper Forums » Thematic

[closed]

Add featured image to full post?

(5 posts)
  • Started 8 years ago by staze
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. Thematic seems to add the featured image to excerpts in categories and archives just fine, but I'd like to add the featured image to single posts, and "the loop" full posts (like on the front page). I can't seem to find a way to do this is a "kosher" thematic way. But I'll fully admit, I'm not fully understanding how the thematic functions work.

    Thanks much!

    Posted 8 years ago #
  2. single posts need to insert image to post (separate from featured image)

    Posted 8 years ago #
  3. Yeah, I know how to do that. but it doesn't seem like it should be necessary. The data is there, I just need to add the function to insert it. I thought someone might have done this already, but if not, I'll try to tackle it myself.

    Thanks!

    Posted 8 years ago #
  4. Adding this:
    function add_post_thumb($title) {
    return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    }
    add_filter('the_content', 'add_post_thumb');

    Into functions.php made things work for the loop. But I'm not sure I like how it looks. I think I want more control, as you alluded to. So, will just stick with adding featured image, and actual post image.

    Thanks!

    Posted 8 years ago #
  5. what more control do you need? you could always wrap it in a containing div or something

    function add_post_thumb($title) {
    return '<div class="featured">'.get_the_post_thumbnail(NULL, 'thumbnail').'</div>' . $title;
    }
    add_filter('the_content', 'add_post_thumb');
    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.