Finding first parent category id from post but excluding a specific category (1 post)

  1. hennyc
    Posted 2 years ago #

    On my single.php I have a sidebar for a wp_list_pages sub menu using hiearchic categories).

    I have posts that have more than one category that goe to the single.php page. I wish to identify the parent category slug (or id) of the first category of the post on single.php that is not the category 'quicklink'.

    e.g. post has quicklink and News categories.
    News has a parent category of Events

    I want to display a sub menu using all the child categories of Events.

    I am stumped and would be very grateful if somebody could help me!

Topic Closed

This topic has been closed to new replies.

About this Topic