I've been plugging away at creating my own theme and am pretty much there, but ran the Theme Check plugin and had a few concerns/questions:

  1. Throughout the theme, wherever there is text, I've used _e( 'Import / Export' ); for example to help with translations. I'm getting this message though throughout: RECOMMENDED: Text domain problems in admin/options-backup.php. You have not included a text domain! I've tried to do some research about text domains, but am for some reason not putting thing together correctly.
  2. I've received warnings for add_custom_image_header and add_custom_background not being included, but I don't necessarily have these things available anyway - is there a way to register these functions, but then take them away (to get rid of that warning)?
  3. One other item is *REQUIRED: Could not find comment_form.* But, in my theme, I am using comments_template() instead - should I just overlook this one? As a frame of reference, I built this off of rootstheme.com

Thanks for any and all help on this one - I hope these types of questions would be useful for others trying to create a clean, WordPress template.

3 Answers 3

  1. Well, it says you are not including text domain... well - because you are not including text domain. Obviously to fix it - you should include text domain. See I18n for theme and plugin developers in Codex.

  2. There is no point in adding extra code just to fake testing results. If you don't need that functionality then just ignore the warning.

  3. If you are using comments_template() but don't actually provide comment template in your theme that means that it fall backs to code in core, that is only retained for compatibility and is marked for removal in the future. This is not proper way to use it - you should implement proper comment template in your theme.

For future - post such unrelated items as separate questions. They don't make sense as single question.


For people that come here looking for a more detailed explanation about the text domain issue instead of just "use a text domain". Here's how it works.

Firstly, you have to tell WordPress where the language files should be put in your theme, and what the 'theme slug' is (a unique identifier for your theme) like so:

add_action('after_setup_theme', 'crucial_setup');

function crucial_setup(){
    load_theme_textdomain('theme-slug', get_template_directory() . '/languages');

Then, where ever you translate text, put the theme-slug on the translation. Like this:

'name' => __('Main Sidebar', 'theme-slug'),

Naturally, 'theme-slug' should be replaced with the name of your theme, sans spaces and any strange characters.

It took me ages to get to the bottom of this, the WordPress docs explain it quite poorly.

  • For those tempted to copy & paste - ensure your rename the function crucial_setup with something unique. Commented Sep 27, 2012 at 12:46

If you have something like _e('') just change it to something like _e('','a4jp')

In this example, a4jp is the theme name (theme-slug).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.