Skip to:

navigation using forum_id

  • Hello,

    I recently transfered my forum from phpbb3 to bbpress and i really enjoy it

    there is only one thing I cannot reproduce with bbpress. I used to have a different style for each category or forums and an image include on top of each. I can do it with forum_id but the variable do not follow in topics


    if ($forum_id == 1) echo 'blabla';

    How could I keep it in topics ?

    Thank you

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

  • chrishajer


    Sounds like you need to get the forum ID from the topic or the post. How about this:

    yes, i did went to that topic earlier, I searched the whole forum but I just don’t get how i should use it I tried : global $topic_id, $forum_id; include(‘../nav/’.$forum_id.’.php’);

    it works fine but only on forum pages. not on topics. The same with an earlier post asking for different stylesheets:

    <link rel="stylesheet" href="<?php if ($forum_id == 1) bb_stylesheet_uri(); elseif ($forum_id == 2) echo '/my-templates/kakumei-blue/style.css'; ?>" type="text/css" />

    It”s ok on forum but not on topics.

    So in my header if I do the routine:

    global $topic; echo “$topic->topic_title”; I get the topic title ok but nothing with

    global $bb_post; echo “$bb_post->forum_id”;



    So, for example, you might have a different header on this forum page:

    But you’d want to use that header on any of the topics when you click through to them, too?

    Like on this page you would still use the installation header image?



    I was able to get the forum ID on a topic page by using this (and nothing else) in header.php:

    <?php echo (get_forum_id()); ?>

    Works on forum pages too.

    Amazing, and so simple

    Thank you chrishajer




    I have looked through the whole forum, searching for an answer, how I can add another theme/design/css per forum category.

    And this is the closest topic I could find, but I think you guys were further in your discussions, than I could understand. So is it possible, you explain to a n00b like me, how I can do this?

    Thank you!

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