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.