Theme Features

Theme is required to incorporate the following WordPress core Theme Features:

Theme must not incorporate the following features:

  • Admin/feature pointers

Function Parameters, Filters, Action Hooks

  • Themes are required to use function parameters, filters, and action hooks where appropriate in order to modify content, rather than hard-coding:
    • wp_title():
      • Themes are required to modify output via filter (wp_title/body_class/post_class)
    • body_class()/post_class()

Template Tags and Hooks

Including files

  • If incorporated into the Theme, standard template files are required to be called using the correct template tag.
  • If incorporated into the Theme, custom template files are required to be called using get_template_part() orlocate_template()
  • Legacy Theme Support
    • Themes are required to include all template files called within the Theme, rather than relying upon legacy Theme support. If a Theme uses any of the following functions, it is required to include the appropriate template file:
      • get_footer()footer.php
      • get_header()header.php
      • get_sidebar()sidebar.php
      • comments_template()comments.php

The following template tags and hooks are required to be included where appropriate:

Site Information

If incorporated into the Theme, site information is required to be called using the correct template tag:

  • Template/Stylesheet Path:
  • Themes are required to use *_url() template tags, rather than bloginfo() equivalents.
    • See Trac Ticket #9008 for additional information related to this use of get_option() versus *_url

WordPress Generated CSS Classes

Themes are required to support the following WordPress-defined CSS classes, or similar elements:

  • Alignment Classes:
    • .aligncenter
    • .alignleft
    • .alignright
  • Caption Related Classes:
    • .wp-caption
    • .wp-caption-text
    • .gallery-caption
  • Post Classes:
    • .sticky
  • Comment Classes:
    • .bypostauthor

While needing to be present in the stylesheet, .sticky and .bypostauthor can remain empty (unstyled) if desired. The intent is simply to ensure that theme developers have considered all classes generated by WordPress.

Theme Template Files

Note: Child Themes may include less than this, since they depend on functionality of the parent theme.

Theme is required to include, at a minimum:

  • index.php
  • comments.php (via comments_template())
  • screenshot.png
    • Recommended size: 880x660px
    • Should be a “reasonable facsimile” of the Theme after it is initially activated with default options
  • style.css

Theme Settings/Data Security

  • Themes are required to use the add_theme_page() function to add the Theme Settings Page to the Appearance menu, rather than using add_menu_page() to add a top-level menu.
  • Themes are required to use the edit_theme_options capability for add_theme_page(), rather than rely on a role (e.g. “administrator”), or a different capability (e.g. “edit_themes”, “manage_options”) for the capability to add the settings page.
  • Themes are required to save options in a single array, rather than create multiple options for its settings page. Use of set_theme_mod and get_theme_mod handles this for you, as does using the Settings API.
  • For checkboxes and select options, Themes are required to use the checked() and selected() functions for outputtingchecked=”checked” and selected=”selected”, respectively.