Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
How to check if it is the forum page
Avatar
Yehonal
Member
Offline
Jun 15, 2017 - 1:47 pm

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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 15, 2017 - 3:13 pm

https://simple-press.com/docum.....functions/

Look at the 'Primitives' section.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yehonal
Member
Offline
Jun 16, 2017 - 9:44 am

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

Thank you

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 16, 2017 - 12:12 pm

All of those are just simple true/false functions.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online: samantaezp
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17366
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626