WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problem With Thumbnails (9 posts)

  1. dkotter
    Member
    Posted 3 years ago #

    I am running an installation of WordPress that I use just mainly as a CMS. I use it to make posts, and then I pull those posts onto my site. Everything is working in that regard, but I recently was asked to change how one part was formatted, and I'm having issues pulling a thumbnail and getting it to display correctly.

    I set up a featured image with each post, and then use the_post_thumbnail() to pull that image out. I have in my functions.php file this code, set_post_thumbnail_size( 350, 150 ); This is supposed to crop the images to roughly that size. The problem is it crops the first image correctly, but the other two are way to short. This can be seen here: http://www.starmoose.com/work.php.

    I have messed with it and can't figure out why the set_post_thumbnail_size() isn't working. I had it working locally, after redoing all my posts, but I tried that on this one and it didn't solve the problem.

  2. keesiemeijer
    moderator
    Posted 3 years ago #

    review post thumbnails
    maybe it is better to set the thumb tumbnail size like this:

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
            set_post_thumbnail_size( 350, 150  );
    }

    try also set_post_thumbnail_size( 350, 150, true );

  3. dkotter
    Member
    Posted 3 years ago #

    I've looked over all the documentation I can find and have everything set up like the examples show. I've tried putting in true, I've tried putting in false, I've tried leaving it blank. I get the same results. If I change the first #, which controls width, the image will change. If I change the second #, which controls height, nothing happens, not even if I set it up to 9999.

  4. keesiemeijer
    moderator
    Posted 3 years ago #

    It looks now that you made it work or is there still a problem?

  5. dkotter
    Member
    Posted 3 years ago #

    Yeah I just fixed it, at least for now. I had to not only redo all the posts, but delete the images and re upload them as well.

  6. keesiemeijer
    moderator
    Posted 3 years ago #

    Maybe, I am not sure, but if you use the new version of wordpress version 3.0.5 it will work for old uploaded post thumbnails.

  7. keesiemeijer
    moderator
    Posted 3 years ago #

    sorry I see you use it already.

  8. dkotter
    Member
    Posted 3 years ago #

    I was using 3.0.5, but I think I updated after I tried implementing this so maybe that was the issue. On another note, I'm having issues with the posts linking to the right place. If you click on the image, it takes you to the home page. I'm assuming this is a permalink issue that I'll mess with later.

    The biggest issue is that when you click on the title, it is supposed to take you to a page where you can see a bigger image and read the full post contents, as well as leave comments. But it just takes you to a page that has the thumbnail and title. The only difference is it does give you the comments page.

    So I haven't had much time to look into it as I've been trying to fix this other issue first but I really don't know why it would do this. Again, maybe it's a permalink issue as well?

  9. dkotter
    Member
    Posted 3 years ago #

    Maybe I should start another thread though for this...

Topic Closed

This topic has been closed to new replies.

About this Topic