The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WordPress HTTPS (SSL)
[resolved] HTTPS for home page (2 posts)

  1. leoproducer
    Posted 3 years ago #

    I had an issue since I have no idea to make all pages https EXCEPT for 1 page. Therefore, I am forced to manually make every page except that one into https. The problem is that I dont know how to make the main home page, my http://www.domain.com, https. How can I go about doing this?


  2. Mike Ems
    Plugin Author

    Posted 3 years ago #

    That's a pain. Don't do that. You can use a piece of code in your theme's functions.php (or in a custom plugin). Change '5' to the ID of the post you don't want to be secure.

    function custom_force_ssl( $force_ssl, $post_id = 0, $url = '' ) {
        if ( $post_id == 5 ) {
            $force_ssl = false;
        } else {
            $force_ssl = true;
        return $force_ssl;
    add_filter('force_ssl' , 'custom_force_ssl', 10, 3);

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress HTTPS (SSL)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.