Requirements for Wordpress Themes


#1

Hi Everyone-

My latest Wordpress theme was soft rejected because it didn’t support child themes. I thought, what a great idea! I had never thought about using child themes as a way for people to modify themes. That would make it very easy to keep changes even when I update theme versions. I know there could possibly be some other things that I could include to really give more value to customers. Is there a list of criteria for for authors to refer to for theme review? I’m assuming there has to be a standard list somewhere but I cannot find one anywhere. Anyone know of any?

Thanks ahead of time!
Andre


#2
2winFactor said

My latest Wordpress theme was soft rejected because it didn’t support child themes.

What? Since when is it a requirement for themes to have child-theme support? :open_mouth:


#3

Not sure, but my theme crashes when a child theme is activated (my options panel urls need to change). Is that not a requirement? I’d love to release the theme and have child theme support be a version 1.1 update since I don’t think many customers will use it. I don’t suppose I could ask TF review team to kindly let this one wait until 1.1? :slight_smile:


#4

What could make a theme not support a child theme? Every time I’ve used a child theme it’s been pretty straight forward: Create the child theme folder, create the child theme style sheet, and activate.

For my own knowledge, can you share what’s not working with your theme and a child theme?


#5

Surely. Upon activation my options panel is looking for options panel files in the child theme (which don’t exist, hence the error). I need to create a function that tests for child themes and changes to url look for the files in the parent theme’s directory. Does that make sense?


#6

Make sure you don’t hardcode any paths in your theme. Instead, use paths relative to your theme root directory and let WordPress dynamically determine that directory using functions like:

http://codex.wordpress.org/Function_Reference/get_template_directory

http://codex.wordpress.org/Function_Reference/get_stylesheet_directory


get_template_directory() will always return the path to the parent theme for example

Hope that helps! :slight_smile:

Chris


#7

Hi Chris,

Thanks for the resources. I do have a function in place to test for these and output the correct one. I must just be missing something small. :confused: I should have a solution for this soon.

Going back to the previous question - is there a requirements list or some things to check before launching a theme? It would be a great resource for all authors - I’m sure there may be something else I might not know about.

Thanks again,
Andre


#8

Also, be sure users can override any custom functions in a child as well with the use of PHP’s function_exists or making them filterable in the parent.

if ( ! function_exists( 'my_custom_function' ) ) {
   function my_custom_function() {
      // code
   }
}

#9

The rejection is not for the child theme per say. It’s for improper codding. Use enqueue scripts and style to add your css and js. Belive me i know, i got rejected for that too :slight_smile:


#10

Thanks Cudazi and Duotive. I’ve been doing both - great practices. Looks like I fixed the bug. Perhaps I should put together a comprehensive checklist of things/test I check for when submitting Themes and add ideas from other authors? Would anyone be interested in something like that?

Andre


#11

Theme Development Checklist: http://codex.wordpress.org/Theme_Development

Theme Unit Test: http://codex.wordpress.org/Theme_Unit_Test

Theme Review Guidelines (for WP directory, but still useful) http://codex.wordpress.org/Theme_Review

Theme Check plugin: http://wordpress.org/extend/plugins/theme-check/


#12
sevenspark said

Theme Check plugin: http://wordpress.org/extend/plugins/theme-check/

Exactly what i was typing… :))


#13

Nice! Thanks for the links Chris! Exactly what I was looking for.

Andre


#14

Sure thing :slight_smile:


#15
2winFactor said

Perhaps I should put together a comprehensive checklist of things/test I check for when submitting Themes and add ideas from other authors? Would anyone be interested in something like that?

Andre

That sounds very nice, you could collect ideas from members with a forum post and something like Google Docs, then put up a page with all ideas (or maybe a download).

It would be a good addition to the wiki and/or extras :wink:


#16

But for example this

REQUIRED: duotive-main.php. Themes should use add_theme_page() for adding admin pages.
Line 4: add_menu_page('Duotive Option Panel', 'Duotive', 'manage_options', 'duotive

is ignorable… because i cannot add subpages with add_theme_page()… some are really useless from that plugin.


#17
duotive said

But for example this

REQUIRED: duotive-main.php. Themes should use add_theme_page() for adding admin pages.
Line 4: add_menu_page('Duotive Option Panel', 'Duotive', 'manage_options', 'duotive

is ignorable… because i cannot add subpages with add_theme_page()… some are really useless from that plugin.

I believe that’s a leftover due to rules when submitting to the WordPress theme repository. Though I don’t think that applies there either nowadays…


#18

I always get that one too on Theme Check. Didn’t have an issue with TF review team on that one either.


#19
duotive said

But for example this

REQUIRED: duotive-main.php. Themes should use add_theme_page() for adding admin pages.
Line 4: add_menu_page('Duotive Option Panel', 'Duotive', 'manage_options', 'duotive

is ignorable… because i cannot add subpages with add_theme_page()… some are really useless from that plugin.

Bunch of those messages are ignorable simply because the logic that analyzes the theme is rather primitive. Here is another example:

RECOMMENDED: Text domain problems in rv_Widgets.php. You have not included a text domain!

Line 1641: $this->form_textarea($instance, 'labels', __('Chart labels: (separated by |)', $this->namespace));

#20

I always get this warning message everytime I check my theme…

WARNING: Found wrong tag, remove premium from your style.css header.

and if I remove the entire tag it says

RECOMMENDED: Tags: is either empty or missing in style.css header.

is this ignorable also?..