Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()

I’m currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error: ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203 It seems like some sort of PHP compatibility issue. I’m running PHP 5.3.10 on … Read more

An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration

I’m running WordPress on a localhost WAMP server and whenever I go to “Plugins” or “Dashboard > Updates” or even to “Dashboard” nothing loads (no WordPress news, no updates, and I’m not able to search for plugins nor update them). In the “Plugins” section, I see this when I try to search for something: An … Read more

Remove type attribute from script and style tags added by WordPress

Warning: The type attribute is unnecessary for JavaScript resources. From line 10, column 146; to line 10, column 176 feed/” /> <script type=”text/javascript”>window Warning: The type attribute for the style element is not needed and should be omitted. From line 11, column 1798; to line 11, column 1820 </script> <style type=”text/css”>img.wp Warning: The type attribute … Read more

Change login error messages

took a look at the questions but I couldn`t find a similar one. I need to change the custom error messages that are displayed when user tries to login with a wrong username or password. Like, change this: “ERROR: The password you entered for the username %1$s is incorrect. Lost your password?” to this “Wrong … Read more

Showing errors with $wpdb update

I am using $wpdb->update to update a custom table I have in my database. When I var_dump the result it returns: int(0) So I tried $wpdb->print_error() to see what’s wrong. However, it shows nothing. I also tried $wpdb->show_errors(), but again it showed nothing. The wpdb docs don’t go into much detail on how to use … Read more

Add validation and error handling when saving custom fields?

I have a function that defines a custom field on a post type. Say the field is “subhead”. When the post is saved, I want to do some validation on the input, and display an error message on the post edit screen if necessary. Something like: // Handle post updating function wpse_update_post_custom_values($post_id, $post) { // … Read more

Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error

I refer to this question previously asked and not suitably answered: Wordpress overriding actual subdirectories and also Non “WordPress” pages/code getting 404 error I have the same problem and I have tried nearly everything I found on the net. It’s definitely related to having permalinks turned on in the wordpress. However, I have put a … Read more