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

How to access Elementor-navigation-elements via jQuery

Make sure that you have jQuery properly enqueued on your website. You can do this by adding the following code to your functions.php file: function my_custom_scripts() { wp_enqueue_script( ‘jquery’ ); } add_action( ‘wp_enqueue_scripts’, ‘my_custom_scripts’ ); Next, you can use the jQuery ready() method to wait for the page to load before accessing the navigation elements. … Read more

Developing an IP lookup function using an API

You’d have to use add_rewrite_rule so you can capture your desired url match and pass it on query_vars Something like; add_action(‘init’, function() { add_rewrite_rule(‘ip/(.+)/?$’,’index.php?ip_search=$matches[1]’,’top’); }); add_filter( ‘query_vars’, function( $vars ) { $vars[] = ‘ip_search’; return $vars; }); dont forget to flush the rewrite rule once you added your own rule, change the permalink settings back … Read more