WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WordPress HTTPS (SSL)] force_ssl on ALL pages?

[Plugin: WordPress HTTPS (SSL)] force_ssl on ALL pages?

Viewing 1 replies (of 1 total)
  • Plugin Author Mike Ems

    @mvied

    Hey GenoGod,

    So you put this?

    function custom_force_ssl( $force_ssl, $post_id ) {
        if ( $force_ssl == true ) {
            return true
        }
        return $force_ssl;
    }
    add_filter('force_ssl' , 'custom_force_ssl', 10, 2);

    If so, that won’t do anything except return true when $force_ssl is already true.

    You would use this to make every page Force SSL:

    function custom_force_ssl( $force_ssl, $post_id ) {
        $force_ssl = true;
        return $force_ssl;
    }
    add_filter('force_ssl' , 'custom_force_ssl', 10, 2);

    You place that code block in the functions.php of your theme. If it doesn’t exist, create it. Using this code is essentially the same as setting your whole site to HTTPS. You may want to consider doing that instead.

    Thanks,
    Mike

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress HTTPS (SSL)] force_ssl on ALL pages?’ is closed to new replies.