Dashboard Whitescreen of Death?

You have active a plugin or theme, that include scripts or styles via function wp_enqueue_style and wp_enqueue_script. Since version 3.3 is it not possible to enqueue script and styles without a hook. Find the source and fix this, is easy to do that. The codex have for this topic a fine documentation. /** * Proper … Read more

How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?

As you are using PHP 5.5+ versions, the old PHP 4 things will throw errors … of course. The error comes from – as you can read – the WordPress importer plugin, which is some kind of badly treated step child of WordPress. plugins/wordpress-importer/wordpress-importer.php:38 One solution is to use our fork with fixes from wecodemore/GitHub, where you can … Read more

Add error message on password protected pages

Here’s a combination of these two great answers (21697 & 71284) to similar questions. wpse241424_check_post_pass() runs early on the wp hook on single password protected pages. If an invalid password is entered, the INVALID_POST_PASS constant is set for use later in the form, and the password entry error cookie is removed to prevent the error … Read more

After upgrading to PHP 7.0 my contact form outputs error

WordPress has a built in function for validating emails and I would advise you use that. So you can replace your preg_match with the wordpress is_email else if (!preg_match(“/^[A-Z0-9.%-]+@[A-Z0-9.%-]+.[A-Z]{2,4}$/”, trim($_POST[’email’]))) { $emailError=”You entered an invalid email address.”; $hasError = true; } REPLACED WITH else if ( ! is_email( trim( $_POST[’email’] ) ) ) { $emailError=”You … Read more

What error logs can I check to see why plugin updates are failing?

In wp-config.php, set the following (if not already set): define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); @ini_set( ‘display_errors’, 0 ); This will make sure that on the site no error is shown, however, WordPress will log all errors in debug.log file inside the /wp-content/ directory. NOTE: You must insert this … Read more

Fatal error post.php help :(

Put your code in whatever function: function whatever(){ // do stuff } add_action( ‘init’, ‘whatever’ ); Or use this to check whether user is logged in or not: if( get_current_user_id() ) { // logged in user }