Forum Replies Created
-
Maurizio CodaParticipant# il y a 1 année et 2 mois
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# il y a 1 année et 2 moisCIao 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# il y a 1 année et 2 moisHi Thomas,
no, it’s not redirecting using above snippet
in reply to: Subscriber roleMaurizio CodaParticipant# il y a 1 année et 2 moisI noticed that get_the_ID() is empty
in reply to: Subscriber roleMaurizio CodaParticipant# il y a 1 année et 2 moiscieo 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
5 sujets de 1 à 5 (sur un total de 5)