A A A
Forum Scope


Match



Forum Options



Min search length: 3 characters / Max search length: 84 characters
Forum Login
Lost password?
coding-topic
How to check if it is the forum page
Avatar
Yehonal
83 Posts
(Offline)
1
Jun 15, 2017 - 1:47 pm
Print

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

16436 Posts
(Offline)
2
Jun 15, 2017 - 3:13 pm
Print

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

Look at the ‘Primitives’ section.

sp_Check
This post answers the topic
andy-signature.png
YELLOW
SWORDFISH
Avatar
Yehonal
83 Posts
(Offline)
3
Jun 16, 2017 - 9:44 am
Print

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

Thank you

Avatar
Yellow Swordfish
Glinton, England

16436 Posts
(Offline)
4
Jun 16, 2017 - 12:12 pm
Print

All of those are just simple true/false functions.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: America/New_York
All RSSShow Stats
Administrators: Blues Dancer, Simple Press, SP Community Support
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 630
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Newest Members:
Reno Finder
David Hnát
Gary Lee
Glen Stewart
Rodney Pacis
kent black
Robert Meharg
test test
Forum Stats:
Groups: 7
Forums: 17
Topics: 10065
Posts: 79363

 

Member Stats:
Guest Posters: 607
Members: 16924
Moderators: 0
Admins: 3

Most Users Ever Online
499
Currently Online
Guest(s)
10
Currently Browsing this Page

1 Guest(s)