Forums

Thumbnail Plugin (13 posts)

  1. Stunt
    Member
    Posted 1 year ago #

    I'm looking for a plugin that will auto-generate thumbnails for posts depending on the size I declare.

    For example, I could insert <?php get_post-thumbnail('width=200&height=150'); ?> in the loop of my index.php theme file and it'll automatically generate a thumbnail of that size (cropped, if its ratio doesn't match) for every post.

    I'd also like to use it for displaying post lists for: recent posts, posts within certain categories, most popular posts for the day, and/or related posts (this one's optional), so that they display like so:

    http://imgur.com/e84Z1.png

    Obviously, that black box in the image is where the thumbnail would be.

    The only plugin I know of that does close to what I ask is Post-Thumb Revisited, but it's terribly outdated and only supports listing recent posts and posts within certain categories.

    Do you guys know where I can find a magical plugin like the one I've described?

  2. Stunt
    Member
    Posted 1 year ago #

    Bump.

  3. Elina Miller
    Member
    Posted 1 year ago #

    can we do it without using plugin?

    pls provide the plugin otherwise..

    i also want to change the logo of wordpress that "W in a circle"..any suggestion..

  4. guitarguyNEC
    Member
    Posted 1 year ago #

    No plugin needed. Check it out:

    <?php if ( has_post_thumbnail()) echo '<div style="float:left; margin:10px;">'; if ( has_post_thumbnail()) the_post_thumbnail('thumbnail'); if ( has_post_thumbnail()) echo '</div><div style="margin-left:90px;">'; ?>
    <?php the_excerpt(); ?>
    </div>

    This code will check the post for a featured image. Then if it exists, it will add the div with the float and the margins. The left margin is so that your excerpt tabs over to account for the image. If you want it to wrap, just take that part out.

    I check for the image first because I run a multi author blog and some authors don't use images. This way, you don't have to mess with a default thumb.

    devravinder: Where do you want to remove the logo? If it is in the admin panel anywhere, you probably shouldn't.

  5. Elina Miller
    Member
    Posted 1 year ago #

    yep its in the admin panel...(wordpress/wp-admin/).just want to put r instead of w in a circle.

  6. Stunt
    Member
    Posted 1 year ago #

    How can I use that code to generate post list of the most popular / recent news?

  7. Stunt
    Member
    Posted 1 year ago #

    Nevermind, that code is not what I'm looking for.

    Please re-read the first post and see if you can help me out.

  8. guitarguyNEC
    Member
    Posted 1 year ago #

    devravinder: Why do you want to change it? I mean, you can, but you have to edit the core files. Next time you upgrade it will just be back. Anyway, if you want to try to find it, my guess is it's in this file:

    /wp-admin/admin-header.php

  9. guitarguyNEC
    Member
    Posted 1 year ago #

    Stunt: As far as I can tell from reading it, this is exactly what you need. You can put it in any file you want including your category. If you don't want to use the built in thumbnail function for some reason, you can use replace ('thumbnail') with (array(200,150)), but then it will not crop it, just reduce it to fit within both parameters.

    Not sure what you meant by popular posts and recent news. You didn't say anything about that.

  10. Stunt
    Member
    Posted 1 year ago #

    It's right there in the first post, my friend.

  11. Stunt
    Member
    Posted 1 year ago #

    So, anything?

  12. Stunt
    Member
    Posted 1 year ago #

    Bump.

  13. Elina Miller
    Member
    Posted 1 year ago #

    Any update?

    Elina Miller

Topic Closed

This topic has been closed to new replies.

About this Topic