• Resolved aminabbasian

    (@aminabbasian)


    Hey All,

    Please view: https://www.kittenproductions.com/new/fashion/fashion-image-2/

    Here you will see an image and menu. What I would like to achieve is to make this image clickable and link to the previous post within the category (which in this case is fashion).

    My code is simply:

    <div class="entry-content">
    <?php the_content(); ?>
    </div>

    And the image is loaded Visual box in Edit Post. I have tried a few things but none seem to work properly.

    Please let me know if you have any suggestions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter aminabbasian

    (@aminabbasian)

    Anyone with any ideas on this?

    Thanks

    Thread Starter aminabbasian

    (@aminabbasian)

    ok to give some update on this.

    I found this thread which doesn’t work.

    And I know to get the previous post in a category I can use:

    <?php next_post_link('%link', 'Next post in category', TRUE); ?>

    So I still don’t know how to link the image within the_content to the previous post. Is there away I can show the content with out using the_content(); tag?

    I’ve tried to wrap the content with the previous post link but this doesn’t work.

    Any ideas?

    Also, if I do get this to work how can I get the last post to link back to the first?!

    Thread Starter aminabbasian

    (@aminabbasian)

    OK I found a work around for this.

    I’ve added both:

    <?php previous_post_link('%link', '', TRUE); ?>
    <?php next_post_link('%link', '', TRUE); ?>

    And styled it so that the links over the image with a CSS block. This block is transparent and when hovered over a PNG arrow shows depending on when you wish to click next (positioned to the right) or previous (positioned to the right).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Making image from the_content() link to previous post’ is closed to new replies.