WordPress.org

Ready to get started?Download WordPress

Forums

get_category_parents as id's (1 post)

  1. lonewolfonline
    Member
    Posted 6 years ago #

    Can get_category_parents return the unique id for a category instead of the slug or friendly name?

    If not how would I go about getting a array of the current viewing category heritage?

    Currently I'm using
    $parents = explode('|', get_category_parents($curcat,FALSE,'|',TRUE));

    and processing with

    'if (in_array($this-slug, $parents))'

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic