Things to consider when using underscores (_s)

Breadcrumb Navigation

I use underscores as a base for my WordPress themes, and many -if not most -themes submitted to the WordPress.org’s theme directory are based on it as well.

But there are some typical mistakes that we see frequently in underscores based themes:

Using old versions
Don’t use old versions of underscores, since they may contain references and fall backs for older functions. Always use a fresh copy.

Forgetting to update the readme files
Underscores comes with two readme files, one .txt and one markdown.
Depending on where you downloaded it from and whether or not you used the advanced option on underscores.me, you need to update these files.
Otherwise your readme files will not be about your theme, and they will read something like:
Contributors: automattic
_s
===
Hi. I'm a starter theme called `_s`, or `underscores`, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.

Imagine the users surprise when they open the readme and find instrutction on how to
1. Search for `'_s'` (inside single quotations) to capture the text domain.

Removing the credit
Some authors remove the credit that says that the theme is based on underscores. Please keep this in the theme. Be fair to other theme authors who has shared their work with you.
Theme name is based on Underscores http://underscores.me/, (C) 2012-2016 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

and
== Credits ==
* Based on Underscores http://underscores.me/, (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)
* normalize.css http://necolas.github.io/normalize.css/, (C) 2012-2016 Nicolas Gallagher and Jonathan Neal, [MIT](http://opensource.org/licenses/MIT)

Forgetting to update the theme and author URI
I can only imagine that the author was in a bit of a hurry here, but it is not uncommon that authors forget to update the links in style.css and in the footer credit.

Forgetting to update the language file
Authors often add new text strings to their theme but forget to update the language file.
Besides updating the strings, you also need to update the following file information:

# Copyright (C) 2017 Automattic
# This file is distributed under the GNU General Public License v2 or later.
"Project-Id-Version: _s 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"

-If you also choose to include an .mo file, make sure to rename it to the locale.
https://developer.wordpress.org/themes/functionality/localization/

Forgetting to update the text domain or prefix
Sometimes authors who use the search and replace method to change the text domain and prefix of the theme misses a couple of places.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *