• Is it possible to have a thumbnail in a post (with just a few words under it) open the post’s page when clicked on like post titles do, and then have the full size image display in the post/comment page? I’m trying to do a gallery using only css and I don’t want titles above the images.

Viewing 6 replies - 1 through 6 (of 6 total)
  • My Post Image plugin may be what you’re after:

    http://guff.szub.net/2006/02/09/post-image/

    See examples there — one points out how to set the image attachment as the permalink to the post (you would just need to set post_image() to use the thumbnail for it).

    Thread Starter flush

    (@flush)

    Thanks,
    I’ll have to try out your plugin to see if it is what I need.

    Flush:

    I used a custom single post template to control the display in my gallery, and left out all the parts I did not want. In the catagory/gallery page I showed only the excerpts, and the excerpts had a thumbnail linked to the post:


    <a href="<?php the_permalink() ?>"><?php the_excerpt_rss(); ?></a>

    You can see this here:
    http://www.beesnest.org/go/gallery/clothing/

    And here is what my custom single post looks like:
    http://www.beesnest.org/2006/09/24/scarf-skirt/

    Actually, here is a single post that does not display *anything* but the_content():

    http://www.beesnest.org/go/gallery/

    Thread Starter flush

    (@flush)

    Thanks,
    I’m totally out of my depth here.
    I’m trying to find a smart way of emulating the Threadless t-shirt graphics voting system (http://www.threadless.com/submissions)using custom css or a gallery plugin with the Postratings plugin.
    I was sure there had to be a way but I may be too unqualified to find it.

    Hmmm.. I may be able to help.

    I think what you want to do should be pretty straight forward when creating custom templates. Each post would have a thumbnail in the Excerpt, and the full size image in the post contents. In your template for displaying the posts, you display the excerpt wrapped in a link to the full post, and the single post template can be customized to display only the parts you want.

    Now, I have custom templates that already do things very similar to this:

    This template is for a specific category listing and is named category-10.php in my theme folder. When I go to that category, it finds this template and uses it instead of the archive.php template. This includes the logic for counting posts and puting them in columns (but not the styles).


    <?php
    /*
    Template Name: Gallery Category
    */
    ?>
    <?php get_header(); ?>
    <div id="content">
    <?php
    $postnum = 1;
    $columns = 3;
    ?>
    <?php if (have_posts()) : ?>
    <h3 class="pagetitle"><?php echo single_cat_title(); ?></h3>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>
    <div id="gallery">
    <?php while (have_posts()) : the_post(); ?>
    <div class="gallery_item">
    <a href="<?php the_permalink() ?>"><?php the_excerpt_rss(); ?></a>
    </div>
    <?php if ($postnum == $columns) {
    echo '<hr style="clear:both; visibility:hidden;" />';
    $postnum = 1;
    } else $postnum++;
    ?>
    <?php endwhile; ?>
    </div>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>
    </div>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    <?php endif; ?>
    <?php include (TEMPLATEPATH . '/gallery-sidebar.php'); ?>
    <?php get_footer(); ?>

    This one is for the single posts for a given category. I have a plugin enabled that allows children categories to inherit the template of the parent. I modified it so that posts in children category inherit the single post template of the parent category. That way, all my gallery subs would have the same gallery single post view. You will notice that I have not included any comments or metadata in the post view. You will want to include your ratings and comments.


    <?php
    /*
    Template Name: Gallery Single
    */
    ?>
    <?php get_header(); ?>
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="paragraph" id="post-<?php the_ID(); ?>">
    <h3 style="<?php the_title("-image-"); ?>"><span style="<?php the_title("-image-"); ?>"></span><?php the_title(); ?></h3>

    <div class="p1">
    <div id="gallery_single">
    <?php the_content(); ?>
    </div>
    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    </div>
    <p class="postmetadata">
    <?php edit_post_link('Edit this entry.','',''); ?>
    </p>
    </div>

    <?php endwhile; else: ?>
    <p>
    Sorry, no posts matched your criteria.
    </p>
    <?php endif; ?>
    </div>
    <?php include (TEMPLATEPATH . '/gallery-sidebar.php'); ?>
    <?php get_footer(); ?>

    I hope that is helpful.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘a question about images’ is closed to new replies.