Hey Victor,
Thanks for the response.
I currently display job applications via a view but would like to restrict the views to only display once the login field has been utilized https://i.imgur.com/bS24RS1.png
<script>
function func_check_user_role( $atts, $content = null ) { $user = wp_get_current_user(); $user_role = $atts['role']; $allowed_roles = []; array_push($allowed_roles , $user_role); if ( is_user_logged_in() && array_intersect($allowed_roles, $user->roles ) ) { return $content; } else { return ''; } } add_shortcode( 'check-user-role', 'func_check_user_role' );</script>
Please login or Register to submit your answer