• Resolved santanin

    (@santanin)


    Good day. First off I want to say that I absolutely love this plugin. Before using the plugin, I was modifying the CSS of countless theme and plugin CSS files and had such a difficult time keeping track of what I did. This plugin allows me to do everything in one place, and it’s incredibly helpful!

    However, I don’t think I can use it nay loner due to an issue with my SSL certificate. When I have CSS being referenced in the plugin on pages of my website protected by an SSL certificate, it results in parts of my page being listed as insecure, thus I do not get the full padlock for the https. The CSS file generated by the plugin is listed with “http” even though I chose to make the page “https”

    Once I deactivate the plugin, then my SSL pages get the full padlock for protection.

    Do you have suggestions on ho to make this work with SSL?

    Many thanks!

    https://www.ads-software.com/plugins/simple-custom-css/

Viewing 5 replies - 1 through 5 (of 5 total)
  • mensmaximus

    (@mensmaximus)

    All my sites work over ssl (explicitly redirected in nginx/apache) and i have no issues. The style sheet is referenced with https.

    Can you check whether your site url in general settings starts with https://?

    Have you tried using the WordPress HTTPS (SSL) plugin?

    Thread Starter santanin

    (@santanin)

    Hello! Thank you for your reply! I do have SSL on my website, however, only on certain pages. I have SSL on my website’s login page and registration page. Everywhere else is just https://

    I use the Better WP Security plugin for controlling my SSL. Once I configure my SSL certificate with the Better WP Security plugin, I then can choose what pages to apply SSL to. And for my site, I only have SSL on the login and registration pages. And since there is CSS I entered in the Simple Custom CSS on my login and registration page, I get the broken padlock.

    Do you have any suggestions now that you know I have SSL only on some pages of my website?

    Many thanks!

    mensmaximus

    (@mensmaximus)

    This is the reason I switched to ssl for the whole site. I had the same issues with many plugins. This is by design.

    If you dont want to use ssl all the time (should have not much impact on performance) the only thing i can think about is to modify the source code of the plugin.

    You would need to change one line in /wp-content/plugins/simple-custom-css/simple-custom-css.php. Open the file an search the following code blog (should be starting at line 89)

    function sccss_register_style() {
     wp_register_style( 'sccss_style', '/?sccss=1' );
     wp_enqueue_style( 'sccss_style' );
    }

    Now change the second line from

    wp_register_style( 'sccss_style', '/?sccss=1' );

    to

    wp_register_style( 'sccss_style', 'https://yourdomain.dom/?sccss=1' );

    Yourdomain.dom is your domain (see the site url setting in wordpress under general settings).

    Keep in mind this will be overwritten if there is an update available.

    Hope that helps.

    Thread Starter santanin

    (@santanin)

    Thank you very much for your help sir!

    Plugin Author John Regan

    (@johnregan3)

    Thanks, mensmaximus! Great tip!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin results in insecure references on my SSL protected https pages’ is closed to new replies.