wordpress add jquery script

Step 1: Go to the WordPress dashboard and navigate to "Appearance" > "Theme Editor".

Step 2: Find the "functions.php" file in the list of theme files on the right-hand side and click on it to open it for editing.

Step 3: Once the "functions.php" file is open, add the following code at the end of the file:

function add_custom_jquery() {
    wp_deregister_script('jquery');
    wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js', false, null);
    wp_enqueue_script('jquery');
}
add_action('wp_enqueue_scripts', 'add_custom_jquery');

Step 4: After adding the code, click the "Update File" button to save the changes.

Please be cautious when modifying theme files, as incorrect changes can cause issues with your website. Always ensure you have a backup of your theme before making any changes.