WordPress.org

Support

Support » How-To and Troubleshooting » add_image_size( ); ???????????

add_image_size( ); ???????????

  • Working on a new site for my ski crew… http://dubsatch.com/

    I’m using the Minimatica theme.
    One the http://dubsatch.com/category/fromthefield/ page I am trying to make the image thumbnail span the whole width of the content area rather than just the left side. This is where I’m stuck. Rather than making things easy this theme likes to use the get_option() a lot. My main blog layout is with the catagory.php but it calls on

    <?php get_template_part( 'loop', 'category' ); ?>

    for the loop. In the loop it asks for the post files…

    [Mangled code removed. Please post code snippets between backticks or use the code button.]

    I can’t figure out where to change the size of the damn thumbnail! I looked in the functions and found…

    add_image_size( ‘homepage-thumb’, 688, 230, 1 );

    I tried posting it everywhere and it never changed the size of the image. I also couldn’t find anything in the CSS.

    PLEASE help!!!!
    This is going to bug me soo bad!

    Thanks
    -Leo

Viewing 7 replies - 1 through 7 (of 7 total)
  • Anyone?? Pleasseee!!!

    Hello?

    Hi Leo, it’s tough to say without any code, but it looks like you’ve got this sorted? On the page you’ve posted it looks like the image is spanning across the entire content area.

    Yeah it’s spanning the whole content area but I want to extend it past that to through the whole width of where the sidebar would go also. What code do you need? I can send over whatever you need…

    You would need to do a couple of things. If you only want the image to span across (and not the text as well) you’ll need to add some new CSS and add something to your functions.php file.

    Right now you have some code that is making sure the images are no larger than 700px wide, you’ll need to override this on your Category and Archives pages.

    CSS to add:

    .category #wrapper img, .archive #wrapper img {
        max-width: 100%;
    }

    Then, in your functions.php file where you found this line:

    add_image_size( 'homepage-thumb', 688, 230, 1 );

    You’re going to want to add a new image size. Add this line just below it:

    add_image_size( 'category-image', 1100, 230, 1 );

    Then you’ll need to open up your category and archive loops and locate the bit of code that looks like this:

    <?php the_post_thumbnail('homepage-thumb'); ?>

    …and replace it with this:

    <?php the_post_thumbnail('category-image'); ?>

    Your thumbnails might not change right away. If that is the case, you’ll need to regenerate all of the thumbnails. Usually that means uploading them all again, fortunately there is a plugin that can regenerate them for you.

    http://wordpress.org/extend/plugins/regenerate-thumbnails/

    Wow thank you so sooo much Doc!!! Seriously I would have never figured that out!

    -Leo

    No problem! Glad you got it sorted.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘add_image_size( ); ???????????’ is closed to new replies.
Skip to toolbar