Saving metabox updates causing fatal error

You are getting that fatal error because your custom mdb_save_metaboxes function is expecting to receive 3 parameters (function mdb_save_metaboxes($post_id, $post, $update)), but WordPress only passed 1 parameter, because you did not tell WordPress that it needs to pass 3 parameters. So to fix the issue, set the fourth parameter for add_action() like so: // If … Read more

Database Queries are crashing the server

It seems like you’re experiencing slow queries after migrating your website to Hostinger. The query you provided is an update statement for the wp_options table in a WordPress site. This query appears to be related to the Freemius API, which is a monetization platform for WordPress plugin and theme developers. Here are some steps to … Read more

Guests comment form – prevent duplicate email addresses

function preprocess_mycomment($commentdata) { $existing_comments = get_comments( array(‘post_id’ => 31691) ); // I run the code for one specific page only foreach ($existing_comments as $comment) { $previous_comments = $comment->comment_author_email; // email address send by the current poster if ( $previous_comments == $commentdata[‘comment_author_email’] ) { // comparing the current email address with the previous ones in database. … Read more