If you’re on specialized WordPress hosting (like WP Engine) or another server setup where your HTTPS/SSL setup is handled outside of WordPress’ settings, you may receive Mixed Content warnings from PageLines assets (CSS, JS, or images).

PageLines references the WordPress Site URL to determine whether or not to load all the assets via HTTP or HTTPS. As such, if your SSL setup doesn’t specify the Site URL as HTTPS, PageLines won’t know to load its assets via HTTPS.

To overcome this and force PageLines assets to be forced via HTTPS, insert this code in your child theme’s functions.php:

// http://forum.pagelines.com/topic/20593-https-issue/?p=120071
add_action( 'pl_force_ssl', '__return_true' );
add_filter( 'pless_vars', 'make_ssl_vars' );
   function make_ssl_vars( $vars ) {
       $vars['plSectionsRoot'] = str_replace( 'http://', 'https://', $vars['plSectionsRoot'] );
       $vars['plRoot'] = str_replace( 'http://', 'https://', $vars['plRoot'] );
       return $vars;

This code snippet does 2 things:

  1. The pl_force_ssl¬†action tells PageLines to load the CSS via HTTPS on all pages. This isn’t a performance concern as long as you haven’t disabled PageLines CSS caching. To see its use in PageLines Core, reference class.render.css.php.
  2. The pless_vars filter forces the PageLines and “sections root” and “root” URLs to be HTTPS so, for example, images loaded from Sections (like the social media icon images from the Branding Section) will be loaded via HTTPS instead of HTTP.

After adding the code, make sure to clear your site’s cache and your browser’s cache. If that doesn’t work, click the Refresh Store button, then go to PageLines Site Options and click the Save Options button just to rebuild everything.

If you still have troubles getting it to work, post in the PageLines Technical Support Forum.

Tagged with →  
Share →

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop us a note so we can take care of it!

Visit our friends!

A few highly recommended friends...