Quantcast
Channel: bbPress.org » All Posts
Viewing all articles
Browse latest Browse all 3669

Reply To: Can i use 2 page content-forum & content-forum-slug on bbpress?

$
0
0

your triple === means that is has to match type (eg string or integer) as well as value, hence why

if(bbp_forum_id() === '513')

didn’t work, as the forum id is an integer and by havng quotes round the number you are asking it to be a string

in your solution

<?php if(bbp_get_forum_id() === $forum_id = 513): ?>

would be better as

<?php if(bbp_get_forum_id() === 513): ?>

or better still

<?php if(bbp_get_forum_id() == 513): ?>

as unless you are using the $forum_id variable elsewhere (when it probbaly needs to be declared as a global) then the $forum_id = is redundant

but glad you fixed it


Viewing all articles
Browse latest Browse all 3669

Trending Articles