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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)