Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add Forum name to Latest Discussion


  • gerikg
    Member

    @gerikg

    How do I add forum name to latest discussion.

    so instead of saying,

    call for testers on the 0.9 branch and 1.0 trunk

    to say,

    Requests and Feedback: call for testers on the 0.9 branch and 1.0 trunk

    I’ve tried <?php forum_name(); ?>

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

  • Ashfame
    Participant

    @ashfame

    forum_name() requires you to pass the forum_id to it. one way of doing is to get the forum_id for the topic_id and then call it. in other words create a function which takes topic_id as argument and do a mysql query to find out the forum_id & then call it.

    I don’t think there is a bb-template function which can do that. you can try coding it. its easy enough.


    gerikg
    Member

    @gerikg

    I don’t know how to write php…


    gerikg
    Member

    @gerikg

    Go it <?php global $topic; forum_name($topic->forum_id);?>

    with the help of _ck_’s post: https://bbpress.org/forums/topic/retrieving-forum-id-from-post-id#post-21521


    Ashfame
    Participant

    @ashfame

    ah.. thats what I said. Good will come to use someday.


    gerikg
    Member

    @gerikg

    or just <?php forum_name($topic->forum_id);?>

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