Title: [WP Content Slideshow] custom image size
Last modified: August 20, 2016

---

# [WP Content Slideshow] custom image size

 *  [Chris Demetriad](https://wordpress.org/support/users/carlozdre/)
 * (@carlozdre)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/wp-content-slideshow/)
 * This gets the photos from the slideshow:
 *     ```
       <li id="main-post-<?php echo $counting;?>" onmouseover="this.style.cursor='pointer'" title="<?php the_title(); ?>">
       <img src="<?php echo $thumb;?>" /></li>
       ```
   
 * $thumb is set up just before that:
    `$thumb = get_generated_thumb("content_slider");`
 * and the function from some other file is:
 *     ```
       function get_generated_thumb($position) {
       	$thumb = get_the_post_thumbnail($post_id, array(389,254), $position);
       	$thumb = explode("\"", $thumb);
       	return $thumb[5];
       }
       ```
   
 * How do I make it display a certain image size? I’ve got set up the ones I need
   in functions php. The reason is, the slideshow just resizes it, therefore is 
   using a much bigger photo.
 * I need that bigger as it is as I have some other parts where I am using it as
   a big image, but I would like to use a custom size and I simply don’t get it 
   from [get_the_post_thumbnail](http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail)
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Chris Demetriad](https://wordpress.org/support/users/carlozdre/)
 * (@carlozdre)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/wp-content-slideshow/#post-2518223)
 * I’ve also tried:
 * `get_the_post_thumbnail($post_id, 'slideshow', $position);`
 * as I have it set up in functions.php:
 * `add_image_size( 'slideshow', 389, 254 );`
 * I just don’t understand and it’s extremely frustrating.
 *  Thread Starter [Chris Demetriad](https://wordpress.org/support/users/carlozdre/)
 * (@carlozdre)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/wp-content-slideshow/#post-2518499)
 * Any thoughts please?
 *  [zentralheld](https://wordpress.org/support/users/zentralheld/)
 * (@zentralheld)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp-content-slideshow/#post-2518631)
 * try
 *     ```
       <?php echo get_the_post_thumbnail($post_id, array(100,50) ); ?>
       ```
   
 * it has worked for me 🙂
    e.g.:
 *     ```
       <li class="on clearfix" id="post-<?php echo $counting; ?>">
        <a href="#main-post-<?php echo $counting; ?>" title="<?php the_title(); ?>">
        <span class="slide-thumb"><?php echo get_the_post_thumbnail($post_id, array(100,50) ); ?></span>
        <?php echo cut_content_feat(get_the_title(), 50, ""); ?>
       </a>
       </li>
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[WP Content Slideshow] custom image size’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [zentralheld](https://wordpress.org/support/users/zentralheld/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/wp-content-slideshow/#post-2518631)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
