您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
4-33. 传统的引入css和js文件的方式(get_theme_file_uri)
发布时间:2023-03-17 20:36:22编辑:雪饮阅读()
这次就很简单了,就是在咱们主题对应页面中引入当前主题里面的资源,例如js或者css文件
这里以当前主题里面简历的1.css文件为例,则如果在index.php中引入这个1.css可以如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="<?php echo get_theme_file_uri();?>/1.css" />
</head>
<body>
</body>
</html>
关键字词:css,get_theme_file_uri