• Hello, i wonder if anyone can help?

    I am after just displaying a category name and relative link to its archive.

    So just the name of say cat id 4 rather than the posts from cat id 4 which is the only thing i seem to be able to find.

    Almost like having the cat link in the menus area, but displaying it on a page?

    Thanks 🙂

Viewing 1 replies (of 1 total)
  • I think this is what you want:

    $cat = 32;
       $catinfo = get_category($cat);
       $name = $catinfo->name;
       $desc = $catinfo->description;
       $link = "<a href='" . get_bloginfo('url') . "?cat=$cat' >Link to $name</a>" ;
       // echo htmlentities($link) . '<br />';
       echo $link;
Viewing 1 replies (of 1 total)
  • The topic ‘Query Just Category Name/Link?’ is closed to new replies.