Support » Fixing WordPress » How to add category link to its name

  • Resolved gunshuter

    (@gunshuter)


    Hi there !
    I have this code
    <?php
    foreach((get_the_category()) as $category) {
    echo $category->cat_name . ‘ ‘;
    }
    ?>
    which displays the category name if I put it in single.php
    what I want is not just to get the name but the url of the category so I am wondering about how to do that
    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add category link to its name’ is closed to new replies.