【发布时间】:2010-10-19 16:50:05
【问题描述】:
我需要一种简单的方法来为两个不同的 wordpress 安装加载相同的样式表。一个在 main.com,另一个在 main.com/secondary。谢谢。
【问题讨论】:
标签: wordpress stylesheet
我需要一种简单的方法来为两个不同的 wordpress 安装加载相同的样式表。一个在 main.com,另一个在 main.com/secondary。谢谢。
【问题讨论】:
标签: wordpress stylesheet
将样式表链接硬编码到实际存储的位置。
<link rel="stylesheet" type="text/css" href="http://example.com/css/yourstylesheet.css">
不要使用看起来像 css/yourstylesheet/ 的相对链接。
【讨论】:
/wp-content/themes...)
我明白了!在 main.com/secondary/wp-content/themes/mytheme/style.css 中,我删除了所有代码并插入了
@import url(main.com/wp-content/themes/mytheme/style.css);
然后为特定的辅助横幅添加了一些代码。由于级联,这当然会覆盖导入文件中的横幅定义。
我想感谢 themeshaper.com/wordpress-child-theme-basics/ 这给了我基本的想法。 (我在做与儿童主题相反的事情。)
【讨论】: