WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Thumbnail issues in portfolio (4 posts)

  1. norrie
    Member
    Posted 1 year ago #

    I'm having an issue where I want the thumbnails on our portfolio page to come in at the size set for thumbnails in the media settings (174 x 126px) but it's coming in at full size. I've remade the thumbnail and checked the uploads folder and can see that the thumbnail is the correct size. What am I missing?

    Page is http://chorusdesign.com/our-work/

    My portfolio page looks like this:

    <?php
    /* Template Name: Portfolio */
    ?>
    
    <?php get_header(); ?>
    
    <div id="main-content">
    
    	<?php
    		$loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 24));
    	?>
    	<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    
    	<?php
    		$custom = get_post_custom($post->ID);
    		$screenshot_url = $custom["screenshot_url"][0];
    		$website_url = $custom["website_url"][0];
    	?>
    
            <div id="portfolio-item">
    		<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?> </a>
    		<h1><?php the_title(); ?></h1>
    		</div>
            <?php endwhile; ?>
    </div><!-- #content -->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
  2. Can yo try changing
    <?php the_post_thumbnail(); ?>

    to

    <?php the_post_thumbnail( 'thumbnail' ); ?>
    I've had to do that in the past on some themes to ensure that the small image shows up.

  3. norrie
    Member
    Posted 1 year ago #

    Brilliant! Thanks so much Christine. really appreciate it! Solved the same problem on my home featured images too.

  4. Yippee! Glad it worked.

Topic Closed

This topic has been closed to new replies.

About this Topic