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:
- 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. - 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)?
- 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.
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.
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.
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:
Then, where ever you translate text, put the theme-slug on the translation. Like this:
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.
If you have something like
_e('')
just change it to something like_e('','a4jp')
In this example, a4jp is the theme name (theme-slug).