Skip to:
Content
Pages
Categories
Search
Top
Bottom

Prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts


  • sevenkader
    Participant

    @sevenkader

    Is there any way at all to prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts?

    There’s a problem that people have been facing with Buddypress for years that give random 404 errors because of a rewrite rule being executed on nonbuddypress pages the more activity there is, is there something I can do to prevent the write rule from being run on nonbuddypress pages?

    So far there have been absolutely no answers/patches over the years

Viewing 1 replies (of 1 total)

  • Varun Dubey
    Participant

    @vapvarun

    One approach is to use the pre_get_posts action hook to check if the current page is a BuddyPress page using BuddyPress conditional tags like bp_is_directory() or bp_is_user(). If the page is not BuddyPress, you can remove or modify the rewrite rules.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar