Forums

How do I 'linkify' this function? (3 posts)

  1. Pete
    Member
    Posted 2 years ago #

    This piece of code displays the category as text... but I'd like it to display as a link to that category... any help would be greatly appreciated. Thanks. Pete xxx

    <?php
    foreach((get_the_category()) as $childcat) {
    if (cat_is_ancestor_of(40, $childcat)) {
    echo $childcat->cat_name;
    }}
    ?>
  2. Pete
    Member
    Posted 2 years ago #

    bump

  3. Edward Caissie
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic