Forum Replies Created
-
Maurizio CodaParticipant# 1 year, 2 months ago
nope! do not work:
This page does not redirect correctly
this is the snippet:
/*** Prevent subscriber to access the dashboard*/function wpca_redirect_subscribers(){// Make sure WPCA is activatedif(!function_exists(‘cuar_is_customer_area_page’)) return;// Make sure we’re browsing the private areaif (!cuar_is_customer_area_page(get_queried_object()) && !cuar_is_customer_area_private_content(get_the_ID()))return;// If current page is a WPCA page or post and user is subscriber, redirect to a custom pageif (current_user_can(‘subscriber’)) {exit();}}add_action(‘template_redirect’, ‘wpca_redirect_subscribers’);in reply to: Subscriber roleMaurizio CodaParticipant# 1 year, 2 months agoCIao THomas,
to be clearer I need “Subscriver” users to be disregarded by the WP Customer Area for which I have created a dedicated user type with “User Role Editor”.
The subscriber should not enter the private area at allThank you
Maurizio
in reply to: Subscriber roleMaurizio CodaParticipant# 1 year, 2 months agoHi Thomas,
no, it’s not redirecting using above snippet
in reply to: Subscriber roleMaurizio CodaParticipant# 1 year, 2 months agoI noticed that get_the_ID() is empty
in reply to: Subscriber roleMaurizio CodaParticipant# 1 year, 2 months agocieo and thanks for the snippet,
something is still not working, after logging in the subscriber is always sent to the private area and not to the mil custom link.
There is something telling the user to go to the private area.
Can you help me?
thanks Maurizioin reply to: Subscriber role
Viewing 5 posts - 1 through 5 (of 5 total)