Forums

[resolved] Magazine Development (5 posts)

  1. teckn1caLity
    Member
    Posted 10 months ago #

    Hey, I have a question for all the wordpress pros. I'm currently developing a magazine-style template and there's going to be only 4 main sections of my site. I'm setting them up to look a little different. My question is - how would I go about using images with different dimensions. My thumbnail image is the main image of the index and archives etc which is set to 300x200px, is there any way to have wordpress generate another size, say 300x300px and a way for me to call the image in that size? Any help is appreciated.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

  3. teckn1caLity
    Member
    Posted 10 months ago #

    Esmi, I looked over that before and I couldn't figure out how to get it working, could you explain it JUST A LITTLE for me? I'm generally a good learner. Use 225x300px for an example for me, if you do ;o

  4. teckn1caLity
    Member
    Posted 10 months ago #

    So here's what I did...

    This is what I would place in my function...

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
            set_post_thumbnail_size( 300, 200 ); // This is my default thumbnail setting in media which is used throughout my index and archives etc.
    }
    
    if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'feature-thumb', 300, 300, true ); //(cropped)
    }

    and this is what I place in my template file?

    <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'feature-thumb' ); } ?>

    Am I doing this right??

  5. teckn1caLity
    Member
    Posted 10 months ago #

    Nevermind close thread, I did it right I just had to regen thumbnails.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.