Add multiple HTML attributes to an Elementor button

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

How to set variable to specific field when querying

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’); } }