WordPress Theme Submission: 10 Steps to Meet Standards

WordPress Theme Submission: 10 Steps to Meet Standards

To get your WordPress theme accepted into the official repository, you must follow specific guidelines set by the WordPress team. These guidelines ensure high-quality, secure, and user-friendly themes.

Key Requirements:

  • Licensing and Copyright Compliance: Your theme must be compatible with the GNU General Public License (GPL) and properly attribute all resources used.
  • Privacy and User Data: Disable any user data collection by default. Clearly document data practices in the readme.txt file.
  • Accessibility: Include skip links, provide keyboard focus indication, underline links, and meet additional accessibility requirements.
  • Code Quality and Security: Eliminate errors and warnings, validate and escape user data, and use unique prefixes.
  • Functionality Limitations: Do not restrict WordPress features behind paywalls, modify the admin area, or include custom post types, blocks, roles, etc.
  • Plugin Recommendations: Only recommend plugins from WordPress.org and provide installation instructions instead of bundling them.
  • Theme Naming and Trademark Compliance: Choose a unique name, make text translatable, and follow the WordPress trademark usage policy.
  • Required Files: Include all necessary files (style.css, index.php, functions.php, screenshot.png) and avoid remote resources.
  • Classic Theme Guidelines: Follow guidelines for style.css, readme.txt, and template files.
  • Block Theme Guidelines: Ensure complete block templates and correct block tagging.

Before submitting, thoroughly review and test your theme, and seek help from the WordPress community if needed. Having your theme listed in the official repository offers increased visibility, credibility, community support, and a broader audience.

Getting Ready

Before submitting your WordPress theme to the official repository, you need to understand WordPress theme development and coding standards. This will help you create a high-quality theme that meets the WordPress team’s guidelines.

Theme Development Basics

Learn the basics of WordPress theme development, including:

  • Required files (style.css and index.php)
  • Template hierarchy
  • Coding standards

Understand how to use HTML, CSS, PHP, and JavaScript to create a functional and visually appealing theme. If you’re new to WordPress theme development, start by learning about the two required files.

Resources

Bookmark these resources for in-depth information on theme development, coding standards, and best practices:

  • WordPress Theme Review Guidelines
  • WordPress Codex
  • WordPress Developer Course

Theme Files

Ensure your WordPress theme includes:

  • style.css (main stylesheet and theme information)
  • index.php (default or fall-back file)
  • readme.txt (installation instructions, theme options, and customization guidelines)
File Purpose
style.css Main stylesheet and theme information
index.php Default or fall-back file
readme.txt Installation instructions, theme options, and customization guidelines

To get your WordPress theme accepted into the official repository, you must follow the licensing and copyright rules.

GNU General Public License (GPL)

GNU General Public License

WordPress uses the GNU General Public License (GPL), which allows users to freely use, modify, and distribute the software. Your theme must be compatible with the GPL (version 2 or later).

License Compliance

Ensure that all code, data, and resources in your theme comply with the GPL or a GPL-compatible license. This includes any third-party libraries, frameworks, or assets you’ve used. Failure to comply with the GPL may result in your theme being rejected.

Properly attribute all resources used in your theme, such as images, fonts, and other assets. Make sure you have the necessary permissions or licenses to use these resources. Additionally, include a copyright notice in your theme’s style.css file with your name, the year the theme was created, and a statement indicating that the theme is licensed under the GPL.

Requirement Description
GPL Compatibility Your theme must be compatible with the GPL (version 2 or later).
License Compliance All code, data, and resources must comply with the GPL or a GPL-compatible license.
Copyright Attribution Properly attribute all resources used in your theme and include a copyright notice in the style.css file.

Step 2: Privacy and User Data

When submitting your WordPress theme, it’s crucial to handle user data collection and privacy responsibly, following WordPress standards. This step helps maintain user trust and comply with privacy regulations.

Disable Data Collection by Default

Your theme should not collect any user data by default. If data collection is necessary, ensure it’s opt-in only, and users are fully aware of what data is collected and how it will be used. This approach respects user privacy and avoids potential legal issues.

Document Data Practices Clearly

In your theme’s readme.txt file, provide clear documentation about data collection and usage. Outline:

  • What data is collected
  • How it’s stored
  • How users can opt-out of data collection

Transparency is key to maintaining user trust, so make sure your documentation is concise, easy to understand, and easily accessible.

Requirement Description
Disable Data Collection Disable any user data collection by default. Make it opt-in only.
Document Data Practices Clearly document data collection and usage in the readme.txt file.

Step 3: Making Your Theme Accessible

To ensure your WordPress theme provides an inclusive experience for all users, it’s crucial to meet accessibility standards. Here’s how to make your theme more accessible:

Skip links allow users to bypass repetitive navigation and jump straight to the main content. Include skip links in your theme to improve navigation for those using keyboard navigation or screen readers.

Keyboard Focus

Provide a clear visual indication of keyboard focus for interactive elements like links, buttons, and form fields. This helps users who navigate using a keyboard identify the currently focused element.

Make sure links within the content are underlined. This helps users with visual impairments distinguish links from regular text.

Additional Accessibility Requirements

If your theme has the ‘accessibility-ready’ tag, ensure you meet all additional requirements, such as:

  • Providing alternative text for images
  • Using semantic HTML
  • Ensuring all functionality is accessible via keyboard
Requirement Description
Skip Links Include skip links for better navigation with keyboard or screen readers.
Keyboard Focus Provide a visual indication of keyboard focus for interactive elements.
Underlined Links Underline links within content for better visibility.
Additional Requirements Meet all additional accessibility requirements for ‘accessibility-ready’ themes.

Step 4: Code Quality and Security

Eliminate Errors and Warnings

Your theme’s code must be free from PHP or JavaScript errors, warnings, or notices. Thoroughly test your theme to identify and fix any issues that may impact the user experience before submitting it for review.

Validate and Escape User Data

To ensure security, validate all user input data before storing it in the database. Escape any untrusted data before outputting it to prevent vulnerabilities like XSS attacks and SQL injection. Use WordPress’s built-in escaping functions, such as esc_html(), esc_attr(), and esc_url().

Use Unique Prefixes

Prefix your theme-specific functions, variables, and class names with your theme slug to prevent conflicts with other themes or plugins. For example, if your theme slug is "my-theme," prefix your functions with "my_theme_".

Requirement Description
Error-Free Code Ensure no PHP or JavaScript errors, warnings, or notices exist in your theme’s code.
Validate and Escape User Data Validate user input data before storing it, and escape untrusted data before outputting it.
Use Unique Prefixes Prefix your theme-specific functions, variables, and classes with your theme slug to avoid conflicts.
sbb-itb-77ae9a4

Step 5: Functionality Limitations

No Paywalls or Admin Changes

Your theme should not restrict any WordPress features behind a paywall or subscription. All WordPress functionality must remain freely accessible. Additionally, do not modify the admin area or alter the activation process. Your theme should provide a seamless experience that aligns with WordPress guidelines.

Avoid Certain Features

Refrain from including the following features in your theme:

  • Custom post types
  • Custom blocks
  • Custom user roles
  • Custom user contact methods
  • Custom mime types
  • Custom shortcodes
  • Non-presentational functionality

These features are better suited as separate plugins, allowing users to choose whether to install them. Keep your theme focused on presentation and layout for a more flexible and user-friendly experience.

Requirement Description
No Paywalls Do not restrict WordPress features behind a paywall or subscription.
Unmodified Admin Do not modify the admin area or alter the activation process.
Limited Functionality Avoid including custom post types, blocks, roles, and other non-presentational features.

Step 6: Plugin Recommendations

When suggesting plugins for your WordPress theme, follow these guidelines:

Only Recommend WordPress.org Plugins

WordPress

Recommend plugins from the official WordPress.org repository only. These plugins have been thoroughly reviewed for security and compatibility with WordPress.

No Plugin Bundling or Auto-Installation

Do not include or automatically install any plugins within your theme. Instead, provide clear instructions for users to install and set up recommended plugins themselves. This gives users control over their website’s functionality.

Guideline Description
WordPress.org Plugins Only Recommend plugins from the official WordPress.org repository. These plugins are vetted for security and compatibility.
No Plugin Bundling Do not include or automatically install any plugins within your theme.
Provide Instructions Give users clear instructions on how to install and configure recommended plugins themselves.

Step 7: Theme Naming and Trademark Compliance

Choose a Unique Theme Name

When naming your WordPress theme, ensure it does not include the words ‘WordPress’, ‘Theme’, or ‘Twenty*’. This helps avoid confusion and potential trademark issues. Instead, opt for a descriptive name that reflects your theme’s style and features.

Make Text Translatable

To meet WordPress guidelines, your theme must be translation-ready. This means all default text used in the theme should be translatable. WordPress provides functions to handle default strings and make them translation-ready. By using these functions correctly, your theme will be 100% translation-ready.

Additionally, follow the WordPress trademark usage policy when naming your theme. You can use terms like "independently developed", "powered by", and "third party" when describing your product or service. However, avoid using "WordPress" as part of a domain name. "WP" is allowed, but not "WordPress".

Requirement Description
Unique Name Choose a theme name that does not include ‘WordPress’, ‘Theme’, or ‘Twenty*’.
Translatable Text Use WordPress functions to ensure all default text in your theme is translatable.
Trademark Compliance Follow the WordPress trademark usage policy when naming your theme and describing your product or service.

Step 8: Required Files

Complete Theme

Your WordPress theme submission should include all the necessary files and folders for the theme to work properly. This includes the main theme files and any additional files required for your theme’s functionality.

File Requirements

WordPress has specific file requirements for theme submissions:

File Description
style.css The main stylesheet containing your theme’s styles and metadata.
index.php The main template file, used as a fallback for other templates.
functions.php A file for custom PHP functions used in your theme.
screenshot.png A screenshot of your theme, displayed in the WordPress theme directory.

Avoid Remote Resources

When submitting your theme, avoid using remote resources without user consent, except for Google Fonts. This ensures your theme is secure and respects user privacy.

Step 9: Classic Theme Guidelines

Main Stylesheet: style.css

The style.css file is the main stylesheet for a classic WordPress theme. It serves two key purposes:

  1. Defining Theme Styles: This file contains the CSS styles that control the visual appearance of your theme.
  2. Providing Theme Information: The header section of style.css includes important details about your theme, such as:

    • Author name
    • Theme version number
    • Theme URL
Header Field Description
Author Your name or the name of the theme author
Version The current version number of your theme
Theme URI The URL where users can find more information about your theme

Readme.txt File

The readme.txt file is a crucial component of a classic WordPress theme. It provides users with essential information about your theme, including:

  • Installation instructions
  • Theme description
  • Copyright details

Ensure your readme.txt file is well-structured and easy to understand. This file helps users quickly grasp what your theme offers and how to set it up correctly.

Template Files

Classic WordPress themes rely on template files to control the layout and design. Here are some key template files:

File Purpose
index.php The main template file, used as a fallback for other templates
header.php Contains the HTML code for the header section of your theme
footer.php Contains the HTML code for the footer section of your theme
sidebar.php Contains the HTML code for the sidebar section of your theme

When working with template files, follow these guidelines:

  • Adhere to the WordPress template hierarchy to ensure proper rendering of your theme’s content.
  • Use the correct template tags, such as get_header(), get_sidebar(), and get_footer(), to include the necessary files in your theme.

Step 10: Block Theme Guidelines

Complete Block Templates

When creating a block theme, ensure your block templates are fully developed and well-organized. A block template is a list of block items that define the initial state of an editor session. It differs from template files used in classic themes, where template files are PHP files. In block themes, template files consist entirely of blocks.

To create a complete block template, you need to define an array of block types using PHP or create a custom block type using the InnerBlocks component. You can also bind specific block templates to your custom post types and lock some blocks or features to force users to use your defaults or prevent errors.

Block Tagging

Another crucial aspect is verifying that blocks do not have missing or incorrect closing tags. This ensures your block theme functions correctly and is error-free.

To avoid block tagging issues, follow the WordPress template hierarchy and use the correct template tags, such as get_header(), get_sidebar(), and get_footer(), to include the necessary files in your theme. Additionally, thoroughly test your block theme to identify and fix any block tagging errors.

Requirement Description
Complete Block Templates Define block templates using PHP arrays or custom block types. Bind templates to post types and lock blocks as needed.
Correct Block Tagging Ensure blocks have proper opening and closing tags. Follow the template hierarchy and use correct template tags.

Conclusion

Review and Test Thoroughly

Before submitting your WordPress theme, carefully review and test it to ensure it meets all the required standards. Go through each step meticulously, covering aspects like licensing, accessibility, code quality, and security. Test your theme with different scenarios and fix any errors or warnings you encounter.

Seek Help When Needed

If you’re unsure about any part of the process or need assistance with a specific issue, don’t hesitate to reach out to the WordPress community or the theme review team. They’re available to help and provide valuable feedback to improve your theme.

Benefits of Official Listing

Having your theme listed in the official WordPress repository offers several advantages:

Benefit Description
Increased Visibility Your theme becomes more visible and accessible to potential users.
Credibility Official listing enhances your theme’s trustworthiness and reliability.
Community Support You can receive feedback and support from the WordPress community.
Broader Audience Your theme can reach a wider range of users.

Related posts

More WorDPRESS Tips, tutorials and Guides