Support Forum

How to check if it is the forum page

YE Yehonal
Yehonal
Member

Hello

i’ve created some filters/action within my theme/plugins that should be registered only if we’re in forum page.

I would avoid ugly url checks. Is there a way to do it via global variables or other methods?

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

https://simple-press.com/documentation/codex/api/template-functions-and-the-api/api-helper-functions/

Look at the ‘Primitives’ section.

YE Yehonal
Yehonal
Member

Ok sp_is_forumpage  , it’s not documented there but i’ve checked the code.

Thank you

YS Yellow Swordfish
Yellow Swordfish
Member

All of those are just simple true/false functions.