One of my websites is in WordPress. I setup SSL on the site. I would like the entire site be loaded via HTTP except 1 page lets call it PAYMENTS.
How can I achieve in WordPress when I click in the menu PAYMENTS it loads it over HTTPS and also load all CSS and JS over HTTPS. Because when I did manually in the url: https://www.example.com/payments/ it loads without any CSS and JS because its all blocked due its loaded over HTTP in the source.
Also want to achieve that if I click in the menu any other item and it goes back to HTTP.
You can get WordPress to use Protocol-Agonstic paths for CSS & JavaScript by adding this to your theme’s functions.php:
Note this won’t be respected by plugins like Better WordPress Minify that change how scripts & styles are included in the page, and this technique won’t work with IE6 (which shouldn’t be a concern these days anyway).
Use agnostic paths to your CSS and JS, e.g.
//
instead ofhttp://
when you are calling them. Also, a great plugin called WordPress HTTPS can do the one-page-only https for you: