Forums

[resolved] How to Make Image in Post a Link to the Post In Category Page (Please Help!) (2 posts)

  1. remotay
    Member
    Posted 2 years ago #

    My category pages are structured to fetch my posts until they hit the 'more' tag. Before the more Tag I have an image floating to the left through Nextgen gallery as well as a bunch of other text.

    Basically my category pages right now show the image floating to the left as well as the text all the way up to the 'more' tag. Is there a simple way I can automatically make the images on the category page link to the post rather than the image?

    My category page now.
    http://bit.ly/a7lCZA

    I want the images to link to the post in the category page, but be normal inside of the post. I imagine I could just add a bit of code to the category page that sees if there is an image in the loop and automatically makes it link to the post?

    Help is very much appreciated!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    You could use wp_get_attachment_image with the_permalink() and then replace the_content() with the_excerpt().

Topic Closed

This topic has been closed to new replies.

About this Topic