Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Issue with information being loaded insecurely after results load
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 1 month ago.
- AuthorPosts
- October 7, 2020 at 5:40 pm #29682
The FTP account above will only allow SFTP connections through port 2222
Issue:
Please see screencast overview of problem here:
https://www.loom.com/share/51a96fc8ccee4f6eb01e30ef88b0fd4cOctober 8, 2020 at 9:45 am #29686Hi,
It usually happens when a site was previously used via the HTTP protocol, and was moved to SSL via a plugin. Those plugins find and replace assets within page contents – usually images – that might still exist with the HTTP protocol URLs. The search tries to recognize these changes internally, but sometimes it fails. However this should be very easy to resolve via a small custom code snippet.
Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
add_filter('asp_results', 'asp_fix_https'); function asp_fix_https($results) { foreach ($results as $k=>&$v) { $v->content = str_replace('http:', 'https:', $v->content); $v->image = str_replace('http:', 'https:', $v->image); } return $results; }
This should do the trick.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 8, 2020 at 10:22 pm #29700Thanks for your help! This worked perfectly.
October 9, 2020 at 6:14 am #29701You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.