我正在使用一个使用php文件作为样式表的wordpress主题。它在头部链接为:动态样式表未加载
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/user.php" type="text/css">
首先,我遇到了读
资源解释为样式,但MIME类型文本 HTML转移警告。
我设法通过@F摆脱消息。 Calderan关于同一主题的说明,但样式表仍然不起作用。
在user.php的文件上面的代码是:
<?php
/*
* User custom styles
*/
define('WP_USE_THEMES', false);
require_once('../../../wp-load.php');
header("Content-type: text/css");
?>
和文件中包含一些基本的规则
.project-view header a {
background-color: <?php echo get_theme_option('background_color'); ?>;
}
通过WordPress管理面板进行设置。
非常感谢您的任何援助
什么是该行的生成的HTML源代码:'<链接的rel =” stylesheet“href =”<?php echo get_stylesheet_directory_uri(); ?>/user.php“type =”text/css“>'?(在您的浏览器中,使用”查看源代码“) – Jocelyn 2012-08-15 23:11:22
谢谢Jocelyn的关注。 * Benjamin Bytheway **解决了它 – jlixerkun 2012-08-16 14:36:17