I found a HTTPS plugin called WordPress HTTPS.  This plugin does a good job of confirming that all of the links on the page are properly formatted for HTTPS when browsing to it.  It allows you to set on what posts/pages need HTTPS and can also be set so the whole site uses HTTPS if you need it to be.  I did however run into a need to be able to set all of a custom post type to be HTTPS.  Instead of making sure I check off the box on every custom post type I wrote the following function call that can be put into your themes functions.php file so that it will set force_ssl equal to true for whenever a specific custom post type is being used.  The following function shows how to force ssl usage for custom post type with a name of “cpt_name”.  More can be added to the list just by adding it to the array $force_ssl_cpt.

[snippet id=”44″]

Even though this doesn't have the highest rating for SSL plugins with a 4.6 out of a possible 5 stars, I do believe WordPress HTTPS is a solid plugin and functions as it should be expected too.

Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.