WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Yet Another Photoblog] Linking Thumbnails in Search Results to Post (1 post)

  1. bob987
    Member
    Posted 4 years ago #

    I need to link the thumbnails in the search results to the post containing the image.

    Here's a link to my site:

    Here's the code I used:

    <?php get_header(); ?>

    <div id="content" class="narrowcolumn">

    <?php if (have_posts()) : ?>

    <h2 class="pagetitle">Search Results</h2>

    <?php while (have_posts()) : the_post(); ?>

    <div class="searchthumbscontainer">
    <div class="searchthumbs">
    <?php if ($post->image): ?>
    image->uri ?>" class="preview" title="<?php the_title() ?>">
    <img src="<?php echo $post->image->getThumbnailHref(array('w=500','fltr[]=usm|30|0.5|3')) ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>" width="100">

    <?php endif ?>

    </div>
    </div>
    <?php endwhile; ?>

    <?php else : ?>

    <h2 class="center">No posts found. Try a different search?</h2>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Note: class="preview" is for the rollover preview image function

    I can't get the preview function and the link to the post to work together.

Topic Closed

This topic has been closed to new replies.

About this Topic