• I noticed the line
    'image' => ( has_post_thumbnail( $widget->ID ) ) ? wp_get_attachment_image_src( get_post_thumbnail_id( $widget->ID ), 'single-post-thumbnail' ) : null,
    in widget-builder.php
    but how would I give that my own thumbnail size while not touching the main code.. and is there a way to have several sizes?

    http://wordpress.org/plugins/widget-builder/

Viewing 1 replies (of 1 total)
  • Thread Starter inTOWN

    (@intown)

    I ended up adding this to the function get_widget_data in the widget-builder.php:

    if(is_active_sidebar('buildings-right') ) {
        $size = "buildings-right";
    }else{
        $size = "banner";
    }

    and changing ‘image’ to:

    'image' => ( has_post_thumbnail( $widget->ID ) ) ? wp_get_attachment_image_src( get_post_thumbnail_id( $widget->ID ), $size ) : null,

    But would love to know a better way!

Viewing 1 replies (of 1 total)
  • The topic ‘How to size the featured image?’ is closed to new replies.