Skip to:
Content
Pages
Categories
Search
Top
Bottom

Tag for fetching forum name from a topic?

  • Is there any way of fetching a topic’s forum name, for example while in a topic “loop”?

    Similar to topic_last_poster() or topic_tags(), only I want the name of the forum the topic is in instead.

Viewing 4 replies - 1 through 4 (of 4 total)

  • mr_pelle
    Participant

    @mr_pelle

    You may retrieve topic parent forum id using $topic->forum_id and then get its name using get_forum_name( $topic->forum_id ).

    Great stuff, thanks! Fixed it with forum_name rather than get_forum_name


    chrishajer
    Participant

    @chrishajer

    forum_name() will echo the result and get_forum_name will not (so you can use it however you want, or just echo it.) I think all the get_ functions just get return value, not echo it.

    Thanks for the clarification Chris, that makes much more sense now.

    The docs for BB Press can’t come soon enough!

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