• Resolved shadow84

    (@shadow84)


    Hi there,

    a quick question – how can I force meta slider to use relative (permalinks) instead of absolute image links, so that the site can load either in https or http?

    i’m sure it’s a fairly easy code hack, but i just can’t seem to find where to make the change!

    thanks in advance,
    Gen.

    http://wordpress.org/plugins/ml-slider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • HI Glen,

    Please try adding this to your themes functions.php file

    add_filter('metaslider_resized_image_url', 'metaslider_relative_urls', 10, 2);
    function metaslider_relative_urls($cropped_url, $orig_url) {
        $new_url = str_replace(site_url(), '', $cropped_url);
        return $new_url;
    }

    Regards,
    Tom

    Thread Starter shadow84

    (@shadow84)

    Hi Tom,

    Thanks for your prompt reply, much appreciated 🙂

    I tried adding the above code to the functions.php file in my child theme, but no luck 🙁 it’s still loading the http instead of https when in https…

    Any other ideas? Sorry for the hassle.

    I’m using Twenty Twelve and latest plugin & WP versions .

    Hi, please could you check the single quotes haven’t been converted to curly ones when you pasted the code in? Sometimes that seems to happen.

    Also maybe try it in the parent theme’s functions.php (I have limited experience with theme stuff but in the past I think I might have had to use the functions.php file from the parent theme – but I could well be wrong!)

    Regards,
    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTTPS vs HTTP’ is closed to new replies.