ThemeShaper Forums » Thematic


Wordpress 2.9 thumbnail feature in Thematic

(9 posts)
  • Started 11 years ago by chicho
  • Latest reply from icedangl007
  • This topic is resolved
  1. I've been trying to get working the new thumbnail feature of wp 2.9 following the code that Mirna has in the web,

    But that breaks my theme. The photos are over the posts. You can see that in

    any ideas?


    Posted 11 years ago #
  2. The code of Mirna, adds the feature and later, remove the thematic loop and rebuild his own loop. I just ad the feature and everything works.

    Posted 11 years ago #
  3. timo

    Im trying to get this to work also.. with no luck.
    Im able to call the function, and im able to choose a thumbnail. But it just doesn't show up on the blog. Perhaps my theme doesnt support this function?

    Posted 11 years ago #
  4. In my functions.php I have,

    // Add Thumbnail Support for Theme (introduced in 2.9)

    if ( function_exists( 'add_theme_support' ) ) {
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size(133, 133, true);

    // ads to each thumbnail a link to the permalink

    function my_post_image_html( $html, $post_id, $post_image_id ) {

    $html = '' . $html . '';

    return $html;
    add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );

    //add thumbnails to category page

    function my_post_content($title) {
    if (is_category()) {
    return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    } else {
    return $title;
    add_filter('thematic_post', 'my_post_content');

    I hope solve your problem

    Posted 11 years ago #
  5. timo

    HI Chicho,

    Thanks for that..

    I tried that, but just seemed to break my theme.
    As far as i can tell the function is working.. But i think the index.php has to have <?php the_post_thumbnail(); ?>

    Cant seem to find the 'loop' exactly...

    I'm quite new to wordpress btw.

    Posted 11 years ago #
  6. TImo,

    Thematic's loops for some of the templates are executed from functions. Look in thematic/library/extensions/content-extensions.php and you will find all of the functions that make up the main loop.


    Posted 11 years ago #
  7. Hi Timo, where do you want show the thumbnails? in front-page or post?. In my case I show the thumbnails in "photo" category or in "photo" page. For the photo-page I use a template and I call the thumbnail in this way

    <div id="photo">
    <ul class="photo-thumb">
    <?php $my_query = new WP_Query('category_name=Photo&showposts=50');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>

  8. "><?php the_post_thumbnail('thumbnail'); // we just set_post_thumbnail_size(133, 133, true);called for the thumbnail ?>
  9. <?php endwhile; ?>


    Are you using Thematic or a childtheme?

Posted 11 years ago #
  • timo

    Thanks Heaps Gene,

    This is exactly what I was looking for (just didn't realize it)

    Cheers guys.

    Posted 11 years ago #
  • icedangl007

    I am having a problem getting the thumbnail to show in my child theme “Gallery.” Here is the string I have in the functions.php file to have my thumbnails show on the home page.

    <img class="thumbnail" src="” />

    here is a link to the demo site:

    I’ve also tried {the_post_thumbnail();} instead of {get_the_post_thumbnail();} and cannot get the thumbnails to show

    Any ideas?

    Posted 11 years ago #

  • RSS feed for this topic

    Topic Closed

    This topic has been closed to new replies.