How to lock users account until approvation
Actually WordPress has ability to prevent user access without acceptation. You should uncheck “Anyone can register” on the /wp-admin/options-general.php
Actually WordPress has ability to prevent user access without acceptation. You should uncheck “Anyone can register” on the /wp-admin/options-general.php
How to customize content-video.php file in wordpress as is in html file?
How to hide header and footer from page template
For redirect you can do something like this. function redirect_to_page() { global $user; if (in_array( ‘specified_role’, $user->roles ) ) { return ‘/wp-admin/post.php?post=7&action=edit’; } } add_filter(‘login_redirect’, ‘redirect_to_page’);
There are 2 problems. The first problem is this: if (is_single (‘^\d+$’)) { is_single can’t take a regex, it only takes: Post ID, title, slug, or array of such to check against. https://developer.wordpress.org/reference/functions/is_single/ So you could do this: is_single( ‘my-page’ ) for example, but in this case it would be better to do is_single() or … Read more
Detecting charcater encoding for wp-config.php file
Always sanitize input fields. Use $wpdb->get_var to check a single variable. You forgot to add the compare value to the WHERE clause. function username_auth() { global $wpdb; $username = sanitize_text_field( $_POST[‘custom_field_username’] ); $user_login_sql = $wpdb->get_var(“SELECT username FROM registration_info WHERE username=”$username” “); if( $username !== $user_login_sql ) { wc_add_notice((‘Incorrect username123’), ‘error’); } }
hello can you advise how to fix the error?
How to pass and validate nonce in custom REST routes
redirect user from login page if is logged