Error with Theme Check Plugin
- This topic has 3 replies, 2 voices, and was last updated 7 years, 2 months ago by
Anh Tran.
-
AuthorPosts
-
January 8, 2018 at 10:59 PM #8167
tsquez
ParticipantHi there,
As you know I am building a theme and using your plugin, Meta Box with it.
As I create the theme, I usually run it through the Themecheck Plugin (https://wordpress.org/plugins/theme-check/). This plugin runs a series of checks to make sure that the theme is following the WordPress Theme Review Standards, https://make.wordpress.org/themes/handbook/review/
If an error is encountered, you are shown what the error is so you can correct.
So today I scanned my theme before starting to do some additional work and I got the following:
RECOMMENDED: Tags: is either empty or missing in style.css header.
So I checked
style.css
and yep the tags are there. So I did some digging and came across this GitHub issue: https://github.com/WordPress/theme-check/issues/50In it you will see that Otto states:
The Tags header is not allowed to be empty or missing, and you should not have more than one style.css file, even if it's in subdirectories. This can cause problems in WordPress itself, because it can and will look in subdirectories to find the main stylesheet file.
So I checked the theme and forgot that I am including two extensions with the theme: MB Conditional Logic and MB Tabs. The extension that has
style.css
is the MB Conditional Logic extensionSo as a test I changed the name of the style sheet and ran the themecheck test again and the
RECOMMENDED: Tags: is either empty or missing in style.css header.
disappeared. I thene renamed it back to style.css, ran the check and I got the message.Is it possible for you to maybe update all your extensions that use a
style.css
file and rename the stylesheets to something likemeta-box-conditional-logic-style.css
or use an abbreviated name of the extension like thismbcl-style.css
?That would be very helpful to any developer trying to get a theme up on WordPress.org.
So for now I have renamed the style.css file in the extension to
mbcl-style.css
Thanks guys.
January 10, 2018 at 2:34 PM #8176Anh Tran
KeymasterHi Thomas,
I will change the file name next time when we update the plugins. This is just an recommendation from Theme Check and that's totally fine.
January 21, 2018 at 1:39 AM #8273tsquez
ParticipantActually it's because, according to the theme review standards, there can only be one file named style.css and that is the theme style sheet.
If there is a plugin included in the theme, such as meta box conditionals and meta box tabs, any stylesheet in the plugins cannot be named style.css.
And even though it is only a recommendation, the theme review team will not approve the theme until that is corrected.
Thanks for correcting it when you update 😉
January 22, 2018 at 10:25 AM #8285Anh Tran
KeymasterI see. You actually can "talk" with the reviewer. Not all rules are restricted. We at gretathemes.com also submitted some themes on wordpress.org and there were some issues that can't follow the rules. Here is an example (see how we explain to the reviewers).
Hope to see your themes soon.
-
AuthorPosts
- You must be logged in to reply to this topic.