ThemeShaper Forums » Thematic

[closed]

Featured Image question

(2 posts)
  • Started 9 years ago by lastraw
  • Latest reply from lastraw
  • This topic is not resolved
  1. Can someone take a look at this code and see what I'm missing?

    I have a category archive portfolio page to show thumbnail links to category:portfolio posts with galleries.
    The featured images are cropping at the right size (larger than the thumbnails) in the post, but the thumbnails on the portfolio page are displaying the smaller size.

    Here is the function.php code I'm using

    <?php
    add_theme_support( 'post-thumbnails' );
    add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
    add_theme_support( 'post-thumbnails', array( 'page' ) ); // Add it for pages
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 9999, 175 ); // Normal post thumbnails
    add_image_size( 'single-post-thumbnail', 250, 250); // Permalink thumbnail size
    ?>

    and here is the template code:

    ?php // action hook creating the index loop
                thematic_indexloop();
                    ?>
    
      <?php
      //adding thumbnails from category
      $posts = get_posts('category=4'); foreach ($posts as $post) : start_wp(); ?>
        <?php the_content(); ?>
        <?php the_post_thumbnail( 'single-post-thumbnail' ); ?>
        <?php endforeach; ?>
        <?php rewind_posts(); ?>

    Here is a link to the test page http://michaeldeperno.com/test/category/portfolio

    Thank you!

    Leslie

    Posted 9 years ago #
  2. I also tried

    <?php
    add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
    add_theme_support( 'post-thumbnails', array( 'page' ) ); // Add it for pages
    set_post_thumbnail_size( 9999, 175 ); // Normal post thumbnails
    add_image_size( 'category-archive', 250, 250); // Permalink thumbnail size
    ?>

    in function.php
    I have the feeling I'm missing something pretty basic here :)

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.