set_post_thumbnail_size
-
In my functions.php, I have:
function theme_setup(){ // Featured Image Support add_theme_support('post-thumbnails'); //set_post_thumbnail_size(900, 600); // Post Format Support add_theme_support('post-formats', array('gallery')); } add_action('after_setup_theme', 'theme_setup');
You see I commented out the line:
//set_post_thumbnail_size(900, 600);
I did that because with this line images could not be loaded in a gallery post. An error message is displayed.Now I can upload images, but then in content-gallery.php, using this line:
<?php echo get_the_post_thumbnail($id, 'large', $attr); ?
there is no image displayed.Two questions:
– what could be the cause thatset_post_thumbnail_size(900, 600);
gives an error, and what could be done about it?
– why is<?php echo get_the_post_thumbnail($id, 'large', $attr); ?
not displaying?Thank you
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘set_post_thumbnail_size’ is closed to new replies.