Post thumbnails
-
Hi i’m using 2.9.x version of wordpress and the new thumbnail funcion.
To use it i set my function.php in this way :
<?php if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9 add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 270, 100, true ); // Normal post thumbnails add_image_size( 'single-post-thumbnail', 500, 300, true ); // Permalink thumbnail size add_image_size( 'related-post-thumbnail', 100, 100, true ); // Permalink thumbnail size } php?>
my question: i need another thumbnail of different dimension to insert it in
<? $quantipost = '10'; // totale dei post da mostrare ?> <h2> <?=$quantipost; ?> Post a caso</h2> <ul> <?php $rand_posts = get_posts('numberposts=$quantipost&orderby=rand'); foreach( $rand_posts as $post ) : ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></li> <?php endforeach; ?> </ul>
is it possible?
when i put <?php the_post_thumbnail( ‘related-post-thumbnail’ ); ?> in that funcion the pic that is showed is always the same, how can i solve this?
thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Post thumbnails’ is closed to new replies.