Mar 23, 2019 5:13 pm
Hi
I'm building a widget that needs to display custom content based on the forum that is being shown. I therefore need to get the forum id. I've tried using
$forumid = $forum['forumid'];
but no value is returned. How can I get the ID for the sidebar widget?
Thanks
1 Reply
Mar 25, 2019 11:40 am
Hi @apollo,
The current forum id is located in the WPF()->current_object['forumid'] variable. When the wpforo template is 'topic' or 'post' this value is 0.