• Hi Ajay,

    I use your Top-10 plugin on my site https://www.newsforshoppers.com

    I’m in the process of switching parts of the site to https.

    With everything else on the site I’ve managed to work it out so that the urls are protocol relative. If http is used as the main url, everything loads http, if the main url is https, everything loads https.

    But I can’t figure out how to do that with the top-10 plugin. It loads http image-src’s and links whether the main url is http or https.

    Any suggestions on fixing this?

    You can check it out by using http or https with any page on the site.

    Thanks,

    Chris

    PS: I am running the most recent versions of WP and the Top-10 plugin.

    https://www.ads-software.com/plugins/top-10/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    Chris, could you please disable the cache in the settings page and check if it’s pulling out the links fine?

    Thread Starter christopheran

    (@christopheran)

    Ah, yes, that did the trick ??

    Thank you.

    So if I am using both http and https on my site, should I just leave the cache off?

    Thanks again!

    Chris

    Plugin Author Ajay

    (@ajay)

    Turning the cache off now would be the best solution since you’re using both http and https

    Are you looking only for the images to be protocol independent?

    Thread Starter christopheran

    (@christopheran)

    Ok, thank you.

    The images are the important part so there are no security errors. The links… that won’t make an important difference here… the part of my site that is going to be https is the member area. My regular public posts will redirect to http for now, so the links are not critical at this point. When I go https sitewide, eventually, everything will redirect to https.

    Plugin Author Ajay

    (@ajay)

    Chris, you can try this code to filter out the http or https. Note I haven’t tested this on mixed sites. It should replace http: and https: with blanks so making the links start with //

    function tptn_remove_protocol_image( $postimage ) {
    
      return str_replace( array( "http:", "https:" ), "", $postimage );
    
    }
    add_filter( 'tptn_thumb_url', 'tptn_remove_protocol_image' );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can I get Top-10 to use protocol-relative urls?’ is closed to new replies.