Forums

Featured Images Need to Be Links (3 posts)

  1. keliason
    Member
    Posted 1 year ago #

    I have set featured images on all my posts. One the homepage, it shows all my post (w/ excerpts and featured image thumbnails). You can click on the post title or on "more" after the excerpt to read the full post. However, I think most people will want to click on the image thumbnail to read more but the image isn't a link. How do I make this image clickable to read the post?

    Thanks!

  2. Digital Raindrops
    Member
    Posted 1 year ago #

    Which theme are you using you will have code for the image, it might be custom code or just the WordPress call?

    For the wordpress call I use a custom class in the loop to hold the image and this code:

    <?php if(has_post_thumbnail()): ?>
    	<div class="cms-image" style="float: left; margin: 5px 5px 0 0;">
    	<a href="<?php the_permalink() ?>"> <?php the_post_thumbnail(); ?></a>
    	</div>
    <?php endif; ?>
    <?php the_excerpt(); ?>

    HTH

    David

  3. keliason
    Member
    Posted 1 year ago #

    I am using the Reflecta theme from FlexiThemes.

    I'm not that good with .php, so I'm a little afraid to mess with the code.

    Kyle

Topic Closed

This topic has been closed to new replies.

About this Topic