WPIntell

Source evidence

How to set default redirect?

Restrictions for BuddyPress · support · 2020-10-06T09:03:00+00:00

mixedsentiment
highseverity
0.95relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 35 rows with source links

20.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
wilayatrust resolved
Hello. Thank you for this excellent contribution. I am using it with BuddyBoss. On my website, when a page is restricted, Restrictions for BuddyPress currently redirects to the registration page. I would rather it redirect to the login page. How might I effect this? Many thanks. This topic was modified 5 years, 7 months ago by wilayatrust . The page I need help with: [ log in to see the link] Hello, glad to hear it works for you. We have a filter for the redirect URL: ‘bp_restrict_pmpro_url_redirect’ it can be changed using some code added to your child theme functions.php something like: add_filter(‘bp_restrict_pmpro_url_redirect’, ‘change_bp_restrict_url’); function bp_restrict_pmpro_url_redirect( $url ) { return ‘ https://mysite.com/login’ ;; } Hi there, The above mentioned code doesn’t work for me, it causes a critical error on my site. Hi, I have added here so there is no formatting issue: https://gist.github.com/codezz/8ce3909871115195f0fba014be7ab35d Hi @staxwp – This isn’t working for me. No critical errors, but it still just redirects to the register page. I don’t have Paid Memberships Pro installed – is that required? Hey there, Thanks for keeping in touch with us. In this case, please try out the code below instead: function sq7_login_redirect( $redirect_to, $request, $user ) { $redirect_to = site_url('/welcome/'); return $redirect_to; } add_filter('login_redirect', 'sq7_login_redirect', 11, 3); I hope this gets to help. Kind Regards

Comments

5 shown
StaxWP 2020-10-12T09:25:00+00:00

Hello, glad to hear it works for you. We have a filter for the redirect URL: ‘bp_restrict_pmpro_url_redirect’ it can be changed using some code added to your child theme functions.php something like: add_filter(‘bp_restrict_pmpro_url_redirect’, ‘change_bp_restrict_url’); function bp_restrict_pmpro_url_redirect( $url ) { return ‘ https://mysite.com/login’ ;; }

ThomDJ 2021-03-04T09:00:00+00:00

Hi there, The above mentioned code doesn’t work for me, it causes a critical error on my site.

StaxWP 2021-03-04T09:21:00+00:00

Hi, I have added here so there is no formatting issue: https://gist.github.com/codezz/8ce3909871115195f0fba014be7ab35d

rollacreative 2021-05-28T18:04:00+00:00

Hi @staxwp – This isn’t working for me. No critical errors, but it still just redirects to the register page. I don’t have Paid Memberships Pro installed – is that required?

john 2021-06-16T06:37:00+00:00

Hey there, Thanks for keeping in touch with us. In this case, please try out the code below instead: function sq7_login_redirect( $redirect_to, $request, $user ) { $redirect_to = site_url('/welcome/'); return $redirect_to; } add_filter('login_redirect', 'sq7_login_redirect', 11, 3); I hope this gets to help. Kind Regards