【发布时间】:2023-03-07 03:57:02
【问题描述】:
大家好,提前提供帮助:我正在尝试将第二个标题添加到自定义临时页面中,并且在该备用标题中,所有备用 css 文件都不同于 style.css。
我像这样从猫模板页面调用自定义标题
<?php get_header('header_state'); ?>
它工作正常并将标题放在页面上,我在这个自定义标题中调用 css 文件,如下所示:
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>//localhost:8888/cnb_press/wp-content/themes/cnb-zip1/state_style.css" media="screen" />
但由于某种原因,我的页面仍在访问 index.php style.css。我在 MAMP 上而不是生活。
有什么想法为什么我没有做对吗?
【问题讨论】:
-
查看链接可能对您有帮助 se template_directory, template_url codex.wordpress.org/Template_Tags/get_bloginfo