Custom filters should execute only on custom page
-
Hi guys,
at first thanks for doing this great job by providing BuddyPress, I really love it.
I have one question, maybe I missed an important part of understanding the firing of hooks.
I set up a custom members directory by creating a page template and adding some custom actions (e. g. bf_before_directory_members, bp_pre_user_query, etc.). Everything works like a charm :-).
The problem is I want the members page coming initially with BuddyPress also enabled, but without firing the hooks I added for the custom members directory. Now the custom filters are being also applied on this page which I want to prevent. I don’t know how to solve this. I tried it out by adding conditions e. g. if ($page_id == $page_id_custom_member_page), but the page id is not available in all filters.
Can anybody help me out with this? This would be great.
Thanks in advance.
🙂
- You must be logged in to reply to this topic.