Yoko theme not loading article banner images
-
So I was using Yoko theme for years with no problem …
Next, I tried several themes last few days, So then went back to activate my Yoko theme … Individual articles no longer load banners from the featured thumbnail (even though the featured images meed the 1101 pixel width requirement).
something broke and I’m trying to figure out what happened.
I added the following debugging output code to header.php in the theme:
<?php if (is_singular() ) : echo "<br> is_singular() true by Richard"; endif; ?> 40 <?php if (current_theme_supports( 'post-thumbnails' ) ) : echo "<br>current theme supports post thumbnails - by Richard"; endif; ?> 41 <?php if ( has_post_thumbnail( $post->ID ) ) : echo "<br>post has a thumbnail image by Richard"; endif; ?> 42 <?php 43 if ( ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' )) ): echo "found true"; endif; 44 echo "<br> source image[0]:";echo $image[0]; 45 echo "<br> width image[1]:";echo $image[1]; 46 echo "<br> height image[2]:";echo $image[2]; 47 echo "<br> post-ID:"; echo $post->ID; 48 echo "<br> defined header-image-width threashold:"; echo HEADER_IMAGE_WIDTH; 49 ?>
Which prints out the following lines in the browser:
is_singular() true by Richard current theme supports post thumbnails - by Richard post has a thumbnail image by Richard found true source image[0]:https://www.richimages.net/wp-content/uploads/2016/04/IMG_1602.png width image[1]:262 height image[2]:350 post-ID:7666 defined header-image-width threashold:1102
Any ideas why the width and height are off … they seem to alway be the same, and they are always wrong …
—–
more background (which may or may not be relevant ) … during trying several other themes, I did load a plugin called: to remake all images from the parent image … and executed that one … however, not sure this really broke things as the thumbnail images all seem to be the same, and are larger than the minimum width requirement …
- The topic ‘Yoko theme not loading article banner images’ is closed to new replies.