Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thanks aseid!

    KazzaG

    (@kazzag)

    Other people seem to have been having similar problems to me in getting the feature image to work properly with thumbnail sizes etc. I have been working on this for a while now and have come up with a working solution, so I thought I’d share in case it helps other people.

    1. The first and obvious thing to do is to set all the sizes as recommended in the instruction file that came with the theme. I have done this with a few modifications (I have quite heavily modified my theme)
    2. set the thumbnail for your post by using an image contained in the post (worth reading the instructions to see what order wordpress uses to create a thumbnail image)
    3. (the fun part) try as I might I could not get the same image to work as the featured image no matter how I cropped it within wordpress’s media function. So I ended up using photoshop to crop my image to the exact size for the header image and uploaded it directly to the featured image in the post. It’s an extra step but less time consuming than working out a fix. Of course you could use any image editing programme to crop to size. And so far it has worked fine!

    It’s worth just saying that I of have the theme set to ‘minimalist slideshow’ in the theme settings, and I have edited the number of slides I want to be shown (this note is contained within the instructions: The slideshow on the homepage queries the last 5 posts with images and displays them in a slideshow. You can increase or decrease this number by editing line 9 and 20 of slideshow.php.)

    Hope that helps someone. You can see my site here: https://www.mypow.net

    KazzaG

    (@kazzag)

    I’m no expert but I’m pretty sure you could do either of those things.. to remove the slideshow, wouldn’t you just remove this section in the header:

    <?php
    	$slideshow = $options['selectinput'];
    	// Only show this is the Single Header Image is selected or if no option is set
    	if ( $slideshow == 1 || !$slideshow ) {
    		// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    		if ( is_singular() &&
    				has_post_thumbnail( $post->ID ) &&
    				( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( '950', '425' ) ) ) &&
    				$image[1] >= HEADER_IMAGE_WIDTH ) :
    			// Houston, we have a new header image!
    			echo get_the_post_thumbnail( $post->ID, '950x425' );
    		else : ?>
    			<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php bloginfo('name'); ?>" class="headerimg" />
    	<?php endif;
    	} // End only show if Single Header Image is selected
    ?>

    I haven’t tried it but it may be worth a shot.

    And to set the header image for the post, I thought that was where you set the feature image within the post (this is what I am having trouble creating a correctly proportioned and cropped image size for)- this can be different to the thumbnail for the post.

    KazzaG

    (@kazzag)

    I have related question – my featured image has started behaving oddly. For some reason, now I can’t seem to get the featured image to be 950 x 425, whearas a few months ago I could get it that size fine – now it just seems to ignore my crop and choose it’s own, thereby stretching the image or giving me an undesireable crop.

    I have worked out the crop ratio to be 2.25 x 1 for the featured image. I have sized it as this for all but the thumbnail to no avail. The media preview seems to be the correct ratio but the actual featured image on my website is not correct. Any ideas?

    Thanks in advance.

    KazzaG

    (@kazzag)

    aseid – you may have already found it but it is an option in the ‘Theme Options’ section – it’s a dropdown under Slideshow Options – none.

    Thread Starter KazzaG

    (@kazzag)

    Cool, thanks!

    Thread Starter KazzaG

    (@kazzag)

    Since writing the above, I disabled the WordPress SEO plugin to test the problem, and I found that the second bit of code is still there so that must be a separate plugin issue or a problem with the template… still dont’ know what the first one is about!

    Thread Starter KazzaG

    (@kazzag)

    OK I found out my problem, nevermind!! I had over-ridden the field name by accident.

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