Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Get Current Forum ID?


reclaimyourskin
Blocked

@reclaimyourskin

Hi guys, i’m trying to get the above code to work without any success.

This is the code i’m using in my header files:

<?php

$current_forum_id = get_forum_id();

while ( bb_forum() ) {

$class = ”;

if ($current_forum_id == get_forum_id()) {

$class = ‘on’;

}

}

?>

…and this is the code i’m using in my front page and forum template (within the menu):

<li class="<?php echo $class; ?>">

Not sure where i’m going wrong, any help would be much appreciated.

Thanks

Skip to toolbar