FP Latest News – Thumbnail sizing


#1

Lovely theme. Thank you for sharing it. A few questions:

Is there a way I can set the thumbnail image sizes to be the same size AND proportion? (Otherwise the lengths are different and it looks untidy).

Also, I don’t seem to have the thumbnails showing up in the sidebar for recent posts. Not sure why.

Lastly, it’s not clear from the support page why we set-up a page named “blog” or what to do with it once it is created. I assume this becomes the template for blog posts, but that part isn’t covered in the support. I assume this is also why when I click on “See all our news” it is linking to only one blog post?

Thanks,
/Joshua
blackswanhunt.com


#2

Hello,

  1. That would be a bit complicated to do, as it would require you to create a child theme and overwrite some stuff. But you can use a custom CSS plugin and add this code:

.home .entry-thumb {
   max-height: 260px;
   overflow: hidden;
}

It will produce a similar result.

  1. You’re using the default widget for recent posts. You should use the one that starts with Moesia. Basically every widget that is built for the theme starts with Moesia or Moesia FP.

  2. When you’ve set your front page to static, there is an option below that lets you select a blog page too (Customize > Static Front Page). Your other assumptions are correct.


#3

I already have a child-theme and I’m quite happy to hack fp-latest-news.php to do it properly. Is it this part?

    if ( $image_uri != '' ) :
       echo '&lt;p&gt;<img src="' . $image_uri . '" />&lt;/p&gt;';
    endif;

Thanks for the other answers…


#4

Whoops. This?

        if ( $image_uri != '' ) :

           echo '<p><img src="' . $image_uri . '" /></p>';

    endif;

#5

Nope. It’s this: <?php the_post_thumbnail(‘moesia-thumb’); ?>. You need to replace moesia-thumb with some other name, then declare the new image size in the functions.php file of your child theme. Something like this:


function childtheme_setup() {
    add_image_size('some-other-name', 350, 250, true);
}
add_action( 'after_setup_theme', 'childtheme_setup' );

Change the size as you require and keep the true argument so the images will be cropped to the specified size. Run a thumbnail regeneration plugin after that.


#6

Can’t seem to get these comment code tags working. Last attempt…

<code markup=“none”>
<?php
if ( $image_uri != ‘’ ) :
echo ‘<p></p>’;
endif;
?>


#7

OK. Thanks.
I’ve changed “moesia-thumb” to “square-thumb”.

My child theme is named “moesia-child”.
Do I replace ‘childtheme_setup’ with ‘moesia-child’ and the ‘after_setup_theme’ to ‘moesia’?

Thanks again,
J


#8

It’s doesn’t matter how you name it, it just matters that the name is unique and that it’s the same in both places where you see childtheme_setup. after_setup_theme needs to stay that way.

I’m sorry, but this would be as far as we go with this customization since the scope of the forum isn’t to handle PHP changes. Thanks for understanding.