WordPress.org

Ready to get started?Download WordPress

Forums

The Bootstrap
[resolved] Change post-thumbnails image proportions (4 posts)

  1. stemie
    Member
    Posted 2 years ago #

    How do I change the proportion of the post-thumbnails image?
    Right now its square.
    set_post_thumbnail_size didn't seem to work.
    Apologies if Im being doff.

    http://wordpress.org/extend/themes/the-bootstrap/

  2. potentweb
    Member
    Posted 2 years ago #

    if (function_exists('add_theme_support')) {
      add_theme_support('post-thumbnails');
      add_image_size( 'main-post-body', 555, 393, true);
      add_image_size( 'wall-size', 200, 200, true);
      add_image_size( 'post-small-preview', 40, 40, true);
      add_image_size( 'home-page', 849, 400, true);
    }

    Then your going to have to regenerate the thumbnails by installing thumbnail regenrate plugin.

    You call it in your template:

    if ( has_post_thumbnail() ) {
    	the_post_thumbnail('whatever you named your thumbnail above');
    }
  3. Konstantin Obenland
    Theme Wrangler
    Posted 2 years ago #

    @potentweb is right. It's probably about the thumbnail size referenced in the the_post_thumbnail() calls. The Bootstrap doesn't add another post-thumbnail size but uses the default 'thumbnail'.

    BTW: You can filter the size with 'post_thumbnail_size', so you don't have to replace every template tag.

  4. stemie
    Member
    Posted 2 years ago #

    Thanks guys that works :)
    post_thumbnail_size saves me some time.
    Much appreciated, thank you Konstantin and twitter for a great theme!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic