Allow Html pages for users with specific roles

You could save the HTML files in the theme with .php extensions and a short comment at the top naming each template, then either put the check-for-certain-role conditional within the php files and apply each template to a Page you create in wp-admin; or create a custom post type, apply each template to a CPT … Read more

Can we get user profile page using user_id in the URL?

You can use the get_the_author_meta() function for this purpose. Use the get_the_author_meta(‘ID’) for only get the ID. Ensure you check the page first with is_author() function before getting the ID. https://developer.wordpress.org/reference/functions/get_the_author_meta/ https://developer.wordpress.org/reference/functions/is_author/

How to add custom user role into wordpress

Example: add_role(‘student’, __( ‘Student’), array( ‘read’ => true, // Allows a user to read ‘create_posts’ => false, // Allows user to create new posts ‘edit_posts’ => false, // Allows user to edit their own posts ‘edit_others_posts’ => false, // Allows user to edit others posts too ‘publish_posts’ => false, // Allows the user to publish … Read more

Change a subsite Admin role of a WordPress Multisite after 24 hours registering

You probably want the built-in cron scheduler. You’ve got two options: either set up a one-off job to downgrade the user 24 hours after registering using wp_schedule_single_event() instead set up a daily job with wp_schedule_event() to check all blogs for users without KYC data and deactivate them if necessary. You should probably change your code … Read more