Can I get a “base URL” in WordPress within a template file?

前端 未结 5 656
有刺的猬
有刺的猬 2021-02-01 03:57

Usually in my PHP apps I have a base URL setup so I can do things like this

tom/jones\">Tom
         


        
5条回答
  •  野的像风
    2021-02-01 04:18

    You can use the built in wordpress function site_url() which retrieves the URL for the current site.

    Take a look at site_url for more details.

    EX:

    Tom
    

提交回复
热议问题