To ensure acceptance into the WordPress.org repository, it’s important to adhere to the strict requirements for submitting themes. Proper licensing, validation, sanitization, escaping, translation, and other important elements should be carefully considered before submitting your theme for review.
There are over 10000 free WordPress themes available in the repository, with more being added regularly. While there is no exact number of daily submissions, during the week of writing this post, 23 new themes were published. Some of the most popular themes, with over 400K active installs, include PopularFX, Hestia, ShopStore, Inspiro, and Startup Shop. Also to the WordPress Twenty____ themes that come bundled with WP and have millions of active installs.
If you’re considering submitting a theme to WordPress.org, it’s important to understand the review process and requirements. Your theme will undergo a thorough review, so it’s crucial to ensure it adheres to the guidelines and standards set forth by WordPress.org.
Check out these related posts on template and plugin development frameworks as well as how to validate data in WordPress
How the Theme Review Process Works for Repository?
To submit your theme to WordPress.org, you’ll need to first log in to your account and upload the theme’s ZIP file here. Once uploaded, a new ticket will be created, and your theme will join the review queue. When your theme reaches the top of the queue, volunteer reviewers will begin evaluating it against the required handbook and provide feedback on any issues they discover. These issues could include problems with licensing, escaping, translation, and more. And if there are more than 3 distinct issues, reviewers are allowed to close your ticket.
It’s important to communicate in the ticket within 7 days of reviewers submitting issues with your theme. Failure to do so will result in your ticket being closed due to inactivity, and you’ll need to resubmit your theme, which will go back to the queue. Fortunately, there is no hard rejection, so you can always resubmit updated themes. However, you’ll need to follow the same queue and wait again.
As someone who has reviewed themes for 5 years, I can tell you that there are common mistakes that developers make when submitting themes. By following the tips in this post, you can increase the chances of your theme being approved.
Who Reviews the themes?
The members of the WordPress review team are all volunteers, including the team leads like KafleG. We give our spare time to the community without receiving any payment or monthly salary.
Therefore, I kindly request that all authors respect the hard work and dedication of the reviewers. The review team comprises of leads, moderators, and reviewers who are responsible for managing the repository as a whole.
If you’re interested in contributing to the community, joining the team is a great opportunity to learn about the theme requirements. Build relationships with other developers, and work with people from all around the world. Reviewing themes is a valuable way to showcase your skills and gain exposure. Plus, it’s a chance to give back to the community by volunteering your time and expertise.
The team is always welcoming new members, so if you’re interested in joining, don’t hesitate to get started. As a volunteer team, we appreciate all the help we can get and are grateful for any contributions made to the repository.
Setting up the theme development environment
When developing a theme for the WordPress repository, there are some basic steps you can take to set up your development environment. These include:
- Setting WP_DEBUG to true in your wp-config.php file to enable debugging.
- Importing theme unit test data XML file to test your theme’s compatibility with different scenarios.
- Installing and activating plugins such as Query Monitor, Theme Check, and Theme Sniffer.
Using plugins like Theme Check and Theme Sniffer can help you identify issues and ensure that your template meets the guidelines of the repository.
Name Collision
Choosing a unique name for your template is crucial for successful uploading to the repository. If your theme name is not unique, the system will block your upload. Therefore, it’s recommended to check whether the name is already taken on the themes SVN and by doing a Google search.
It’s important to note that the repository system checks for the number of active installs of a theme. If a particular one has more than 50 active installs, you won’t be able to use that name. However, if the theme is legally yours and is already available on Github or other shops and marketplaces, you can still upload it with some help. You can ask for assistance on the #themereview channel of Slack chat, and someone will guide you.
Licensing Issues
To ensure compliance with the repository guidelines, all resources used in your theme, such as libraries, images, scripts, CSS, HTML and fonts, must be 100% GPL compatible. Also be 100% GPL compatible after release. It’s essential to mention the license of all resources used in your theme in the readme.txt file.
If you’re selling a premium version of your theme, it must be 100% GPL compatible and must include a declaration of the license on your theme’s website. You’re not permitted to host free themes in the WordPress repository if your pro themes aren’t GPL compatible.
When it comes to images, authors often use images from websites like Unsplash, Pixabay, and other non-GPL sites. However, it’s recommended to use sites like pxhere and stocksnap as they comply with the GPL license. Additionally, you must provide the license information for any images used in your theme’s screenshots or bundled.
Translation Issues
To comply with guidelines, your item must be translation-ready. This means that all default text used on the theme must be 100% translatable. WordPress provides functions to handle default strings and make them translation-ready. By using these functions correctly, will be 100% translation-ready.
As a reviewer, I’ve noticed that many themes fail to meet this requirement. Therefore, it’s crucial to double-check that your template is translation-ready before submitting it for review.
Untranslated default strings are a common issue found in themes. To avoid this, ensure that you use the appropriate functions for handling text strings.
<p>Related Posts</p>
This text is not translation ready.
The solution is,
echo __( 'Related Posts', 'text-domain' );
Some more examples,
// __ functions are the basis of localization. echo __( 'Related Posts', 'text-domain' ); // echo doesn't required in this case. _e does both translation ready and print the value. <?php _e( 'Related Posts', 'text-domain' ); ?> // Whenever you want to escape the html and make it translation ready and echo it. <?php esc_html_e( 'Related Posts', 'text-domain'); ?> // localization and variables. <?php _n( 'One post', '%s posts', $count, 'text-domain' ); ?>
You can check the Twenty____Themes codes to know more about it. The Check and sniffer plugin will help you to find the untranslated strings.
Escaping Issues
Escaping issues are critical security concerns that you must address in your theme development. To ensure the security of your theme, you need to use valid escaping functions. Before entering any untrusted data into the database, you must validate it, and before outputting any untrusted data, you must escape it.
For instance, consider the following code:
$my_title = get_theme_mod( 'my-title' ); echo $my_title;
In the above code, the output of the $my_title variable is not escaped. To escape it correctly, you can use the esc_html() function, like this:
$my_title = get_theme_mod( 'my-title' ); echo esc_html($my_title);
Similarly, to escape URLs, you can use the esc_url() function. Here’s an example:
<a href="<?php echo esc_url( get_permalink() ); ?>"></a>
Enqueue Style and Sripts
Enqueuing styles and scripts is important for maintaining a well-organized and secure theme. It is not recommended to hard-code them in your theme files. WP provides functions such as wp_enqueue_style() for CSS and wp_enqueue_script() for scripts to properly enqueue them. Here are some examples:
function theme_slug_scripts() { wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/framework/Font-Awesome/css/font-awesome.min.css' ); wp_enqueue_script('bxslider', get_template_directory_uri() . '/assets/framework/slick/slick.min.js', array( 'jquery' ),'20151217', true ); wp_enqueue_script('theme-slug-navigation', get_template_directory_uri() . '/js/navigation.js', array(),'20151215', true); } add_action( 'wp_enqueue_scripts', 'theme_slug_scripts' );
Includes popular JavaScript libraries by default, so you should avoid including your own version of them. For instance, do not enqueue your own version of jquery.js as WordPress already includes it.
Prefixing Issues
Prefixing your theme-specific functions, variables, classes, image sizes, hooks, and filters with your theme slug is important to prevent conflicts with other themes or plugins. Here are some examples:
// Functions prefixed with theme slug function theme_slug_scripts() // Classes prefixed with theme slug class Theme_Slug_Customize_Category_Dropdown_Control // Global variables prefixed with theme slug global $theme_slug_theme_options; // Image size names prefixed with theme slug add_image_size( 'theme-slug-carousel-img', 700, 450, true ); // Hooks and filters prefixed with theme slug add_action( 'theme_slug_related_posts' );
When you enqueue your own scripts and styles, it’s important to prefix their handles with your theme slug. This helps prevent conflicts with other themes and plugins. You should also prefix the handle of your custom styles and scripts, but not for third-party libraries or frameworks
Here are some examples:
// Enqueueing theme-specific scripts and styles wp_enqueue_script( 'theme_slug_script', get_template_directory_uri() . '/js/custom-script.js' ); wp_enqueue_style( 'theme_slug_style', get_template_directory_uri() . '/css/styles.css' ); // Enqueueing library scripts and styles wp_enqueue_style( 'slick', get_template_directory_uri() . '/css/slick.css' );
Readme file Issues
When creating a readme file, it’s important to validate it using a readme validator to ensure that it meets the necessary standards. In the readme file, you should include information about the license for any resources used in the theme. Also want to include a changelog, important descriptions, setup instructions, and any other relevant information that users should be aware of. By providing a well-written and informative readme file, you can help ensure that users have a positive experience with your theme.
Screenshot Issues
When creating a screenshot, make sure to use a size ratio of 4:3 and a recommended size of 1200 x 900 pixels. Additionally, any images used in the screenshot must have their licenses properly documented in the readme file. Avoid using promotional text in the screenshot and instead use placeholder or Lorem Ipsum text. For example, it’s allowed to use “Let’s Party Together,” but not “Perfect Theme for Party.”
Plugin Recommendation
Themes are allowed to recommend plugins, but they must be available in the official plugin repository. Non-repository plugins can also be recommended, but they must comply with the plugin guidelines. To recommend plugins, you can use TGM or similar libraries. However, you should not require any plugins for your theme to work properly. It should function seamlessly without any recommended plugins.
What Types of Themes Are in Demand?
A wide range of templates are in demand, from business and eCommerce to small companies and wholesalers, personal resumes to large blogging platforms. However, some of the most popular categories with a larger number of downloads include health and wellness, personal finance and budgeting, cooking and recipes, fashion and beauty, and more.
To gain a better understanding of what types of theme are in high demand or any question. Collaborate with some of the awesome review team contributors and team leaders. Check out the list below:
KafleG, Alexandru Cosmin, Carolina Nymark, William Patton, Samuel Wood (Otto)
Conclusion
In addition to the items listed above, there are other important things to consider while developing themes. However, the issues of escaping, validation, and licensing are the major ones that need to be carefully checked during the review process. Therefore, I highly recommend you pay close attention to these issues before submitting your themes to WordPress.
If you plan to submit themes to the repository, I suggest you do the following three things:
markdown
- Examine the code of previously live themes.
- Review other themes that have been submitted.
- Read the handbook and follow the guidelines.
The review team is composed of volunteers, so if you’re interested, consider joining the team today.