Preventing RSS feeds access to the authenticated uses only

Assuming that: Different types of memberships = different User Roles You can simply apply some conditional logic to achieve this: function disable_rss_conditionally() { // First let’s check if the user is logged in // you can use current_user_can() to pass to forbidden roles if (! is_user_logged_in() || current_user_can( ‘subscriber’ ) ) { // you can … Read more

Get WordPress username to customize url

You can only do that if the user is logged in (otherwise there is no “current” user). Depending on what your specific use case is, it would be something like this: if ( is_user_logged_in() ) { global $current_user; $current_user = wp_get_current_user(); // get the username: $username = $current_user->user_login; // set up the URL: $url = … Read more

Student access credentials

Hard to canonically answer, but as long as you haven’t made the inputs and error message inaccessible to assistive technology, the only issue I foresee is what happens when someone tries to reset a password or needs to access any other system-generated email. With fake email addresses, the users will never be able to receive … Read more