Thumbnail size and header
-
Hello, i was looking how i could show excerpt with thumbnail and i found this solution. It’s great because the thumbnail become the header in the post.
That’s my code in my child them
functions.php
<?php
add_image_size(‘excerpt-thumbnail’, 140, 140, true);
?>content.php
<!– This adds the post thumbnail/featured image –>
<div class=”excerpt-thumb”>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”>
<?php the_post_thumbnail(‘excerpt-thumbnail’, ‘class=alignleft’); ?></div>
<?php the_excerpt(); ?>Now there is a problem with https://developers.google.com/speed/pagespeed/insights i have only 5/100 because my site is slow cause of charging full instead only a smaller imager. How could i do for have both small size thumbnail and the same in higher quality in the header when i read the post.
I’m a newbie 🙂
The topic ‘Thumbnail size and header’ is closed to new replies.