0

My site is using Cherry Framework theme. I changed the site to use https but there is still one jquery script which is obviously hardcoded because it's still using http.

I have searched all files in theme directory and in cherry plugin directory as well but never found that line of a script.

Can I still overwrite it somehow to use https?

  • Try deactivating all plugins and switching to a default theme. Check if the error is still present. If it is, you could probably benefit from a database migration plugin which will find any http references and switch them to https. If the error is not present, then switch on your theme and check, switch on plugins one by one and check, and that way you can determine which theme or plugin it's coming from. – WebElaine Jun 14 '17 at 15:50
1

If the script is enqueued using wp_enqueue_script (as it "should" be) then you can modify the tag directly with a find and replace match to fix this using the script_loader_tag filter:

add_filter('script_loader_tag', 'custom_https_fix', 10, 2);
function custom_https_fix($tag, $handle) {
    $match = 'jquery.script.js'; // replace with actual script filename
    if (strstr($tag, $match)) {$tag = str_replace('http://', 'https://', $tag);}
    return $tag;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.