ThemeShaper Forums » Thematic


Inserting post-thumbnails in Thematic

(4 posts)
  • Started 11 years ago by michieldoetjes
  • Latest reply from mrsmarshah
  • This topic is resolved
  1. michieldoetjes

    Hi! I'm relatively new to Thematic. I'm amazed by how powerful this framework is and how easy it is to build your own child-themes.

    I want to add post thumbnails to my child theme, but I'm struggling getting it right. Steps I took:

    1. I added the thumbnail function to my functions.php using the following code:


    2. I added the call for the thumbnail to my customized post-header (function: mdv5_postheader) using the following code:

    $postmeta .= the_post_thumbnail();

    3. And this is where the problem starts: it doesn't matter where in the postheader I place the call for the thumbnail, it automatically places the thumbnail above the post-title.

    Any ideas on what I might be doing wrong?

    Posted 11 years ago #
  2. Hi,

    using the 'wrong' function call ;)

    the_post_thumbnail will echo the result instead of to return it.

    Use get_the_post_thumbnail instead.


    Posted 11 years ago #
  3. michieldoetjes

    Brilliant, thanks!


    Posted 11 years ago #
  4. mrsmarshah

    Hi Chris,

    I am having the same problem but I am using get_the_post_thumbnail. What am I still doing wrong? (thumbnail is displayed above the title)

    set_post_thumbnail_size( 250, 250, true );
    function my_post_title($title) {
    if (is_category()) {
    return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    } else {
    return $title;
    add_filter('thematic_postheader_posttitle', 'my_post_title');

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.