is_wp_error is missing error

Both wp_remote_post and wp_remote_get return WP_Error object if there is an error. You could use the get_error_message function of WP_Error class to receive the error and show it. $request = wp_remote_post( $url ); if ( is_wp_error( $request ) ) { // If the request has failed, show the error message echo $request->get_error_message(); } else { … Read more

Homepage Not Found Error [closed]

I’ll try my best to guide you trought some ideas that could solve your problem. 1 – Make sure your .htaccess is set to default If you check the WordPress CODEX, you could compare your default .htaccess to the one you have on your root folder. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – … Read more

Template administration Error after WP 4.8 update

This is a generic PHP question, but simple to answer. The problem is most likely caused by PHP 7. Simply change the line: $callback[0]->$callback[1](); to $callback[0]->{$callback[1]}(); This is because $callback[0]->$callback[1](); means $callback[0]->{$callback[1]}(); in PHP5, while it means ($callback[0]->$callback)[1](); in PHP7. Take a look into this page to know the details about the change.

Warning: : DOMDocument::loadHTML(): Empty string supplied as input in functions.php when adding classes to post images

Here’s an updated version of the code that will avoid the warning by adding a simple check that will return $content unmodified if it’s an empty string. The original code adds <html> to the modified markup (check the page source), which we don’t want. The code below fixes that too. add_filter( ‘the_content’, ‘wpse_add_img_post_class’ ); function … Read more