• Cathy Mitchell

    (@multitalentedmommy)


    I am creating a link to help users navigate backwards in a category template.
    What works:

    <a href="<?php
    //this link works perfectly
    echo get_category_link ( $category->category_parent );?>">
    Back to <?php
    //this displays the parent category id number
    echo the_category($category->category_parent);?></a>

    The above returns:
    Back to 10
    With the link in tact, and the 10 being the current category’s parent cat ID.

    How do I get it to simply list he category nice name based on the ID above?

    Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to get the nicename of a parent category?’ is closed to new replies.