/*
Theme Name: your-theme
Theme URI: https://wordpress.org/themes/twentytwelve/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front page template with its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background.
Version: 1.0
Requires at least: 3.5
Requires PHP: 5.2.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
Text Domain: twentytwelve
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/
/* =Notes
--------------------------------------------------------------
This stylesheet uses rem values with a pixel fallback. The rem
values (and line heights) are calculated using two variables:
$rembase: 14;
$line-height: 24;
---------- Examples
* Use a pixel value with a rem fallback for font-size, padding, margins, etc.
padding: 5px 0;
padding: 0.357142857rem 0; (5 / $rembase)
* Set a font-size and then set a line-height based on the font-size
font-size: 16px
font-size: 1.142857143rem; (16 / $rembase)
line-height: 1.5; ($line-height / 16)
---------- Vertical spacing
Vertical spacing between most elements should use 24px or 48px
to maintain vertical rhythm:
.my-new-div {
margin: 24px 0;
margin: 1.714285714rem 0; ( 24 / $rembase )
}
---------- Further reading
http://snook.ca/archives/html_and_css/font-size-with-rem
http://blog.typekit.com/2011/11/09/type-study-sizing-the-legible-letter/
/* =Reset
-------------------------------------------------------------- */
7条答案
按热度按时间7tofc5zh1#
在Wordpress 4.9中有一个bug:https://core.trac.wordpress.org/ticket/42573导致模板文件每小时只重新扫描一次。
要修复(直到他们发布一个新的WP版本与此更改),下载该错误票上的补丁,并从补丁到
wp-includes/class-wp-theme.php
的更改。希望这能节省我在这上面浪费的两个小时。
balp4ylt2#
对于上面提到的Wordpress 4.9错误,只需在style.css中更新主题的版本,例如从1.1.2到1.1.3 -甚至1.1.2-1也可以。这将强制更新模板列表。
czfnxgou3#
请确保您已经激活了您的子主题,如果您的子主题已经激活,请尝试不同的模板名称。
v8wbuo2f4#
这对我很有效:
在我的主题目录中有一个page.php的副本,名为redpage.php
我也不得不退出管理,然后重新登录。
eeq64g8w5#
我尝试了所有的方法,最后按照上面提到的stol做了。更新你的主题的版本是位于你的主题文件夹中的style.css。我的设置为0.1.3。我更新到1.1.2,它工作了。
4urapxun6#
1.激活您的子主题
2.如果你优化你的style.css文件,再次添加你的第一个注解,如
kgqe7b3p7#
我知道这篇文章很旧,但它可以帮助别人。
您可能已经删除了style.css文件,它位于主题的根目录(wp-content/themes/your-theme-name/style.css)。
了解这是否是您的问题的一种方法是进入“外观〉主题”并查找此错误:“错误:样式表丢失”。
如果你有错误,你可以复制它并把它放在你的style.css里面