Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Prevent guest users to see bbpress forums */
- function redirect_non_members_bbpress() {
- if (class_exists('bbpress')) {
- if (is_bbpress()) {
- wp_redirect(home_url(). '/register/', 301);
- exit;
- }
- }
- }
- add_action('template_redirect','redirect_non_members_bbpress',22);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement