WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Picture Widget (2 posts)

  1. cableghost
    Member
    Posted 4 years ago #

    I have tried a few picture-related plug-in's, but can't seem to get exactly what I want.

    I would like to present a picture in my sidebar that is based on the tags of the respective post.

    Additionally, I want to set the maximum width of the picture.

    Any ideas?

    -Scott

  2. cableghost
    Member
    Posted 4 years ago #

    How about using WP's built-in post thumbnail function?

    Here's the code my theme has in functions.php.
    <?php if ( function_exists("add_theme_support") ) { add_theme_support("post-thumbnails"); } ?>

    I have tried adding the following to my sidebar, but nothing is displayed.
    <?php the_post_thumbnail( 'single-post-thumbnail' ); ?>

    I would also like to set the max width to 180px.

    Any ideas?

    -Scott

Topic Closed

This topic has been closed to new replies.

About this Topic