Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get Parent/Category of current bbPress forum


  • rewindcaz
    Participant

    @rewindcaz

    All I want is a way to print the name of the parent category for any given bbPress page from the header.php file of my theme.

    I need something as simple as:

    echo forum_name($forum->forum_parent);

    Although that doesn’t work for me. Anyone know how to get the parent name? Thanks!

Viewing 1 replies (of 1 total)

  • rewindcaz
    Participant

    @rewindcaz

    The closest thing I could find is:

    echo get_the_title($post->post_parent);

    However, that only grabs the parent from one step back in the bread crumb. I need to get the “main” or “base” parent of all pages/threads under the parent. Say the forum structure is like this:

    Forum > Tennis > Tutorials > Thread Name 1

    The set “parent” in that is “Tennis” (bolded above). Is there a way I can print that main parent for all bbPress pages?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar