WordPress.org

Ready to get started?Download WordPress

Forums

Category link in post (1 post)

  1. Arcane
    Member
    Posted 6 years ago #

    Hello.

    I have a bit of trouble and I'm wondering if anyone could be kind enough to suggest a code for me to solve it.

    The problem is that I want a link to appear in top of my posts. The link should lead to the categories archive for the category where the post is posted. I'll try to break it down for you.

    I have 4 different categories that I use for my posts, let's call them 1,2,3 and 4. In everyone of my posts I want a link that leads to the category archive for the post. So if I'm reading a post posted in category 1 the link is going to lead to the category archive for category 1. If I'm reading a post posted in category 2 the link is going to lead to the category archive for category 2, you get the deal.

    I really hope you understand what I mean and I'll be grateful for any helt I can get.

    Note that I want to implement it in the following code. The current one doesn't work as it creates a text link.

    <div><a href=<?php the_category(', ') ?> onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','/images/projektlista_over.jpg',1)"><img name="Image3" border="0" src="/images/projektlista.jpg"></a></div>

Topic Closed

This topic has been closed to new replies.

About this Topic