Title: HTTPS again?
Last modified: August 21, 2016

---

# HTTPS again?

 *  Resolved [BennyLi](https://wordpress.org/support/users/bennyli/)
 * (@bennyli)
 * [12 years ago](https://wordpress.org/support/topic/https-again/)
 * I have setup my wordpress host to run via http and https. When I login to the
   admin panel I’m only using https. But when I try to use PrettyPress it does not
   load.
 * I inspected the frame and it tries to load the http version, but the browser 
   prevents it (tested on firefox and chrome). So I digged deeper and found out 
   that the WP function `get_permalink( $id )` returns the http scheme. It uses 
   the `home_url()` function internally that should automatically detect the correct
   scheme via `is_ssl()` function. The `is_ssl()` function correctly returns true
   but `home_url()` does not return https! So I guess this is a wordpress issue?
 * What did correctly work is the `site_url()` function…
 * I made a quick and dirty fix. But maybe you find a better solution. Please find
   my fix below. I put this into the prettypress/view/edit.php file:
 *     ```
       <!-- PrettyPress meta -->
       <div id="prettypress_meta">
       	<input type="hidden" id="prettypress_post_id" value="<?php echo $post->ID; ?>" />
       	<?php
       	preg_match("/(http[s]?).*/", site_url(), $schemeToUse);
       	$permalink = preg_replace( "/(http[s]?)/", $schemeToUse[1], get_permalink( $post->ID ) );
       	?>
       	<input type="hidden" id="prettypress_post_permalink" value="<?php echo $permalink; ?>" />
       	<?php
       	if (! empty( $_GET['prettypress_active'] ) ) { ?>
       	<input type="hidden" id="prettypress_autoload" value="1" />
       	<?php }	?>
       </div>
       ```
   
 * If you like I could create a Pull Request on GitHub.
 * [https://wordpress.org/plugins/prettypress/](https://wordpress.org/plugins/prettypress/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [evasivesoftware](https://wordpress.org/support/users/evasivesoftware/)
 * (@evasivesoftware)
 * [12 years ago](https://wordpress.org/support/topic/https-again/#post-4998337)
 * Hey Benny,
 * Thanks for bringing this to our attention.
 * Yep please send a pull request through on GitHub and we’ll apply a patch.
 * [https://github.com/evasivesoftware/PrettyPress](https://github.com/evasivesoftware/PrettyPress)
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘HTTPS again?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/prettypress.svg)
 * [PrettyPress](https://wordpress.org/plugins/prettypress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/prettypress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/prettypress/)
 * [Active Topics](https://wordpress.org/support/plugin/prettypress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/prettypress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/prettypress/reviews/)

## Tags

 * [get_permalink](https://wordpress.org/support/topic-tag/get_permalink/)
 * [home_url](https://wordpress.org/support/topic-tag/home_url/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [site_url](https://wordpress.org/support/topic-tag/site_url/)

 * 1 reply
 * 2 participants
 * Last reply from: [evasivesoftware](https://wordpress.org/support/users/evasivesoftware/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/https-again/#post-4998337)
 * Status: resolved