Pointers To Getting A Theme In The WordPress Repository

Some pointers to getting your theme accepted for hosting in the WordPress repository!

The sad bits:
This time last year the waiting time was way less than what it is today in order to get a theme reviewed, approved and set to live!

Today we have to wait 4 months!

The Que is: 700+ themes awaiting review [View The Que Here] – UPDATE: Good news. The Ques is now down to under 450 tickets – a huge improvement but still some way to go!

We have on average around 70 theme reviewers active in any given week who are doing an awesome job but still out-numbered by the volumes of new themes coming in daily!

The tidbits of issues listed below are not meant to embarrass anyone and there’ll be no name calling either. My intention here to give some pointers to help you help us (TRT) help you if that makes sense?

So, as a theme reviewer these are just some of the issues I see over and over again and if we could all take a little time, care and a bit of attention life will be a little bit easier.

OK let’s have at it!

style.css:
Theme URI: https://wordpress.org/themes/themename/ – No, that’s reserved for default themes. Link to your own domain, please!
Seriously, what could be more reassuring to your user than letting them know where on the net you are and how you can better serve them?

style.css/readme.txt: – No theme copyright declaration. You must declare your theme’s copyright together with its license
YourThemeName
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Copyright (C) 2016 WPDevHQ http://wpdevhq.com/

header.php:
Not conditionally checking on Pingbacks:-

212-2

<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

The above is incorrect. Use

220-2

<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>

An even better solution is to use a function callback hooked to the wp_head action like below

225-2

function sabino_pingback_header() {
	if ( is_singular() && pings_open() ) {
		printf( '<link rel="pingback" href="%s">' . "\n", get_bloginfo( 'pingback_url' ) );
	}
}
add_action( 'wp_head', 'sabino_pingback_header' );

header.php:
Hard coding scripts in the header – I see the below code in header.php and I’m like hello? That’s old school dude. Get enqueueing!

230-2

<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>

Not sure how to do it? Take a look at the default themes or simply ask 🙂

header.php: Escape please!!! home_url() is a no no, use esc_url( home_url( '/' ) ); instead. Notice the spaces 😉
And then there are times we escape but use the wrong value – like esc_url(site_url('/'));
Let’s see who knows the difference here 😉

@package WordPress in theme files – Remove it! It’s reserved for default themes.
What the above means is that the theme is part of WordPress i.e. the default theme(s). Mine and yours are not 🙂

Translation/Internationalization:
Like when you forget/omit or simply carelessly don’t include the textdomain

235-2

<button class="menu-toggle"><?php _e( 'Primary Menu' ); ?></button>

If in doubt check and check again!

Options – Baking my own:

add_action( 'admin_menu', 'theme_options_menu' );
add_action( 'admin_init', 'settings_init' );

Please don’t take the biscuit! Use the Customizer will you. The good news here is that we are seeing very less of this but it’s still happening to be worthy of a mention!

Taking initiative, wrongly with:- update_option( 'default_options', $settings );. erm hello, what are you doing? The rule here is that a theme must not save any option without the user’s interaction.

As if taking the biscuit and baking my own wasn’t enough – now I wanna add my own flavour like so:…

wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
wp_enqueue_script( 'jquery' );

Don’t do it!!! Security and you are going to break a few plugins in the process.

OK I admit, I think I was a bit hungry when I was writing the above but you get my drift don’t you?

Sometimes enthusiasm can get the better of us: add_action( 'init', 'themename_widgets_init' ); widgets_init is the correct hook to use.

Let’s not forget that awesome looking screenshot:- huh! What do you mean I gotta add x-plugin plus z-plugin and press that thingymajig to get anywhere near how the screenshot looks? I say, let’s keep it simple. I little tease? Yes of course 🙂 just don’t over do it!

These are just a few things that crop up time and time again with theme’s submitted for review and a little care and attention can go a long way to get your theme approved quicker. Plus think of the amount of time it would save the reviewers and yourself while at the same time helping to reduce that long, long Que.

I remember the days when one could submit a theme, get it reviewed after 2/3 weeks and it’s live in the repository by the 4th week at the latest. Now? We have to wait 4 months mostly because of those silly little issues above that keep cropping up.

Talking about waiting times, we at the TRT (The Review Team) know and understand how frustrating it can be – after all, some of us are also theme developers. We feel you so help us to better help you 🙂

A final thought: Just imagine – if each developer that submits a theme was to take a little time and review at least one theme in return 🙂 And what if you could say 5 or even better, 10 themes in a week?

Just imagine 😉

Sometimes we do miss things: Common Admin Review Issues

For an indepth guide on what is doing_it_wrong() and how to do_it_wright() please refer to the Doing it wrong example theme’s wiki on GitHub

2 Replies to “Pointers To Getting A Theme In The WordPress Repository”

    1. Hello Sasi,

      Thank you for bringing that omission to my attention.

      I’ve updated the post and reactivated the gist plugin. I’ve also included a link to the Doing It Wrong theme’s wiki which has a lot more examples of the wrongs and wrights and hope you’ll find it a useful guide.

      All the best with your theme and hope to see it in the repository soon.

Leave a Reply