Wordpress get_template_directory_uri() returns http instead of https

前端 未结 7 1255
暖寄归人
暖寄归人 2021-02-19 03:32

We have recently applied SSL certificate on our website and we want all our url to have https:// protocol.

Once we moved our website to https://, our website broke down

7条回答
  •  青春惊慌失措
    2021-02-19 03:53

    Please use the following:

    get_stylesheet_directory_uri();
    

    it will be a web-address (starting with http:// or https:// for SSL). As such, it is most appropriately used for links, referencing additional stylesheets, or probably most commonly, images.

    https://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

提交回复
热议问题