AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Getting the current forum id

2 Posts
2 Users
0 Reactions
2,869 Views
Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@apollo)
Active Member
Joined: 8 years ago
[#8223]

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


Topic Tags
1 Reply
Sofy
Posts: 5777
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

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.


Share: