post Thumbnails at the Home page

  • Oliver

    #9875

    Hi

    How can we fix the post Thumbnails at the Home page?

    The theme (by default) shows 55 words in an excerpt.

    I want no text excerpt, but only a medium size thumbnail instead of text.

    Mod

    Kenneth John Odle

    #44805

    If you want to change the length of all excerpts, you can add this code to your child theme’s functions.php file:

    function custom_excerpt_length( $length ) {
    return 0;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    If you only want to make them disappear on your home page, use this CSS:

    .home .excerpt-thumb + p {
    display: none;
    }

    Oliver

    #44806

    Thank you Kenneth once again. I missed .home !

    How do I get the image thumbnail to fill out the empty place, and have the right dimensions then?

    This code .home .excerpt-thumb img {width:300px; height:150px; } do not look nice.

    Mod

    Kenneth John Odle

    #44807

    That code will stretch your images, which, as you discovered, won’t look good.

    You’ll need to play around with your WordPress media settings, and then use a plugin (such as Ajax Thumbnail Rebuild) to rebuild all your thumbnails to a better size.

    Oliver

    #44808

    OK, Kenneth, I was hoping you had a code that could do this 😉

    Thanks again for your help. I will do as you recommend.

    Oliver

    #44809

    Mmmmm, I have a question

    Photos look good in the slider. And have dimensions I like. Can I insert these instead? and how?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.