WordPress.org

Ready to get started?Download WordPress

Forums

How to post thumbnail crop only the featured image (9 posts)

  1. Fariid
    Member
    Posted 1 year ago #

    Hi ;

    I have a problem with post thumbnails , I'm using this code in my functions.php file :

    add_theme_support( 'post-thumbnails' );
    add_image_size( 'gallery', 206, 78, true );

    WordPress in default crop any image be upload to 206x78 size .

    Can any help me about this ?

    PS : sorry for my english .

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Remove that line and then use CSS to re-size your post thumbnails only.

  3. Fariid
    Member
    Posted 1 year ago #

    Thanks , but I want use this code , because I always love to have website with high speed load .

    Do you have any solution to crop only featured image ?

  4. esmi
    Forum Moderator
    Posted 1 year ago #

  5. Fariid
    Member
    Posted 1 year ago #

    Thanks again , but I read all of them :(
    I can't find a solution about it yet .

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Try reading the section entitled "Set the Post Thumbnail Size"

  7. Fariid
    Member
    Posted 1 year ago #

    I'm really sorry , I use this code

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 206, 78, true );

    But anything not changed !

  8. Fariid
    Member
    Posted 1 year ago #

    I can remove the "true" from code, But I want to crop only the featured image

    [No bumping. If it's that urgent, consider hiring someone.]

  9. Jahanzeb Khan
    Member
    Posted 12 months ago #

    look at the add_image_size function in the codex reference, when showing the thumbnail show it like so,
    the_post_thumbnail( 'gallery' );

    http://codex.wordpress.org/Function_Reference/add_image_size

Topic Closed

This topic has been closed to new replies.

About this Topic