快速获取WordPress当前主题文件夹目录的方法-WordPress主题

摘要:在制作wordpress主题时,主题的header.php和footer.php都需要引用当前主题文件夹内的一些css文…

在制作wordpress主题时,主题的header.php和footer.php都需要引用当前主题文件夹内的一些css文件、js文件,所以我们需要一个固定且快速获取当前主题路径的方法。

首先,我们先了解下如何调用当前网站地址的函数

获取主题目录,三种方法如下:

调用主题文件夹下的js文件夹内的jquery.js库,方法:

调用主题文件夹下的Css样式表(style.css),我们还有更快速的方法:

来源:http://www.wazhuti.com/2695.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_13031.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?