Call   0208 3131682   Mon-Fri 9am-6pm

Hide Buddypress members pages from guests ( also hide BBpress forum posts)

The code below is to hide sections of a WordPress website from guests (hide certain pages or groups of pages on a WordPress , so they are only available for logged in users).

In this case we’re hiding all the Buddypress members pages from guests ( so hiding all pages that start with /members such as member profiles and so on). We’re also  hiding BBpress forum topics ( but they can still view the forums and forum post / topic names ).

If a guest is trying to view a page (that we’re not allowing them to, they are sent to the homepage).

 

 

Leave a Reply