Updating posts exceeds maximum execution time

You do have a large amount of posts which will crash your server (due to maximum execution time being exceeded) with such an expensive operation. We will need to run this in a much more cleverer way. First of all, we would want to get all posts, except revision and nav_menu_item. Revision post_names are build … Read more

Suddenly forbidden 403 error on some pages

Please check the permissions of files and folders. All folders should have permission set to 755 and files should have 644 . If permissions are different than specified, please try changing the permissions. You can easily check and change permissions using filezilla. Let me know if it helps.

WordPress: Notice:Object of class WP_Query could not be converted to int in on line

Your problem is here: $featuredPosts = new WP_Query(); $featuredPosts->query(‘showposts=”.get_option(“mp_slides_no’).’&category_name=”.get_option(“mp_featured_cat’).”); for($i=1; $i<=$featuredPosts; $i++) { You’re creating a new instance of WP_Query to run a custom query and storing it in the $featuredPosts variable. But then you’re trying to use $featuredPosts as the upper limit of a for loop. This is what PHP is complaining about. Your … Read more

Declare Global Variable In OOP PHP

The $current_screen is passed as a variable to callables hooked from the current_screen hook. Before this hook, the $current_screen isn’t set up, so globalizing the variable won’t do anything anyway. Also, WordPress offers the convenience function get_current_screen() that returns the global $current_screen variable if it exists. class wpse { protected $current_screen; public function load() { … Read more

Error after moving WordPress installation

Is the site still working/displaying properly , other than this error on the front end? It looks to me like your new hosting environment has warning and notice reporting ON. Consider looking in your wp-config.php file for WP_DEBUG and make sure it’s set to false. Depending on how much control you have on your hosting … Read more

Display all WP Errors together during form validation

Sorry to bother . It was one of my other functions which was limiting the error to echo only once. Here is the previous code : function display_message( $message = false ) { if( is_wp_error( $message ) ) { echo ‘<div class=”error”><p>’ . $message->get_error_message() . ‘</p></div>’; } It worked fine when i changed it too … Read more