New answers tagged

2

WP loads jQuery in no conflict mode so shortcut $ is not available for jQuery to use .You should not use the $ variable for jQuery within WordPress. jQuery(function ($) { //code here }) or (function($){ //code here })(jQuery); There are so many Q&A which refers to the same conflict issue.Check this and this.


0

I think !isset is a more reliable way of testing so I added that: add_filter( 'registration_errors', 'odin_registration_errors', 10, 3 ); function odin_registration_errors( $errors, $sanitized_user_login, $user_email ) { if ( !isset( $_POST['role'] ) || empty( $_POST['role'] ) || trim( $_POST['role'] ) == '' || ...



Top 50 recent answers are included