WordPress.org

Forums

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

  1. leoproducer
    Member
    Posted 2 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?

    http://wordpress.org/extend/plugins/wordpress-https/

  2. Mike Ems
    Member
    Plugin Author

    Posted 2 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

Tags

No tags yet.