Error: SELECT SQL_CALC_FOUND_ROWS

This wouldn’t be caused by a change in the database. What the error refers to is this: SELECT SQL_CALC_FOUND_ROWS wp_posts.id FROM wp_posts WHERE 1 = 1 AND 0 GROUP BY wp_posts.id ORDER BY wp_postmeta.meta_value + 0 DESC, wp_posts.post_date DESC LIMIT 0, 10 Your code only includes data from the wp_posts table (second line above) but … Read more

Call to undefined function

The problem, as pointed out in the php error, is on line 7 of the “chat.php” file: add_action( ‘init’, ic_show_chat_bar()); This line has two problems: The correct syntax for a valid callback function should be without the parenthesis and wrapped in single quotes. Since the function is declared inside a php class, it won’t be … Read more

Get notified by email when Fatal error occurs on wordpress site?

I think you are misusing shutdown hook. WP attaches it to use with register_shutdown_function() and it’s meant to process end of script execution, not log/process errors. If you want to handle errors in a custom way you are better off using generic PHP set_error_handler() which is meant for that.

Ajax return code 400

Here’s a base snippet I use for AJAX submits in WordPress, it might help you out: <?php if (isset($_POST[‘my_theme_ajax_submit’])) if ( wp_verify_nonce( $_POST[‘nonce’], ‘my_theme_ajax_submit’ ) ) my_theme_ajax_submit(); function my_theme_ajax_submit() { // do something // some php code that fires from AJAX click of #fire wp_mail( ‘[email protected]’, ‘my_theme_ajax_submit() fired’, time()); wp_die(); } ?> <button id=’fire’>Fire Something</button> … Read more