I'm looping through all of the sub-categories of a certain parent category, and am displaying a bunch of information about those sub-categories. I can get the description, name, id, etc, but I can't seem to pin the permalink.
Here's my code:
<h2 class="title" id="post-<?php $child->cat_ID; ?>"><a href="<?php get_permalink(get_page_by_title($child->name)); ?>" rel="bookmark" title="Permanent Link to <?php echo($child->name); ?>"><?php echo($child->name); ?></a></h2>
$child is the sub-category, and that code is part of a foreach loop. I've tried numerous attempts to get the permalink, but I keep getting -
Any idea what's wrong with my code?