Changing the pointing of assets from old server to new server

Usually scripts and styles are loaded with wp_enqueue_script or wp_enqueue_style in the theme’s functions.php. That’s the most common scenario. This function takes an $src parameter which is the absolute URL to the resource, and the best practice is to use get_stylesheet_directory_uri to retrieve the URL to the folder containing the script. This way, if the … Read more

Ajax Call not Working in Plugin

You need to add the ajax callback action on your plugin file or themes functions.php like as below: add_action( ‘wp_ajax_fetch_data’, ‘fetch_data_callback’ ); add_action( ‘wp_ajax_nopriv_fetch_data’, ‘fetch_data_callback’ ); then you need to put all the featch_data.php code inside the callback function ‘fetch_data_callback’ like as below: function fetch_data_callback(){ //your function code goes here wp_die() // need to add … Read more