JavaScript errors

Try & paste this below code your active theme functions.php file add_action( ‘wp_enqueue_scripts’, ‘load_jquery_fix’, 100 ); function load_jquery_fix() { if ( ! is_admin() ) { wp_deregister_script( ‘jquery’ ); wp_register_script( ‘jquery’, ( “//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js” ), false, ‘1.11.3’ ); wp_enqueue_script( ‘jquery’ ); } }

Alphanumeric usernames and error message for it

Check for alphanumeric For more details, look at the regex Q on SO. $name=”input string 123″; // Doesn”t allow: // Pre-/Appending white space // Not more than one space in between // Non-alphanumeric characters (lower case) if( ! preg_match( “/^[a-z0-9]+([\\s]{1}[a-z0-9]|[a-z0-9])+$/i”, $name ) ) { // Output Error Message } // Or: Does only allow // … Read more

Random HTTP 500 error in WordPress

If the problem is easily reproducible (i.e. you can make it happen again and again by following a set of steps), do this: Step 1: Document the steps required to cause the problem. Step 2: Document all of the plugins you have running Step 3: Deactivate all of your plugins! Step 4: Perform the steps … Read more

Post show up as post and pages

I just wanted to post the solution here instead of deleting just in case this ever helps anyone else. The problem was this 1 small function I had tucked away in a setting file… /** * change number of posts shown per page in admin area */ function admin_pagination(){ global $wp_query; $per_page = 5; $wp_query->query(‘showposts=”. … Read more