Theme testing process (from Wordpress Codex)
from Theme Unit Test (Wordpress Codex):
When viewing any Template Hierarchy Index page, including the default index page (index.php), and (if applicable) Blog Posts Index (home.php), Date Archives (archive.php), Category Archives (category.php), Tag Archives (tag.php), or Author Archives (author.php):
If the Theme includes either a front-page.php or a home.php template file, go to Dashboard -> Settings -> Reading, and set the Front Page to display a Static Page (use any existing Page), and set the Blog Posts index to another Static Page (e.g. "Lorem Ipsum").
Test the following posts when viewing the Blog Posts Index page. Post Titles in the test data correlate with section titles below.
Test the following posts when viewing a single post (single.php). Each section title matches a post title in the test data.
Long Post Title with long non-breaking string: If you say it loud enough, you’ll always sound precocious; Supercalifragilisticexpialidocious!
Test the following pages (page.php) by viewing the page that matches the section titles below.
Tests for search.php and 404.php.
Theme authors should only be using links that point directly to a website specifically for the theme; an appropriate website page for the theme; or a reasonably related URL giving more information about the theme. Using anchor text for search engine gains will not be accepted.
from Theme Development (Wordpress Codex)
When developing a Theme, check your template files against the following template file standards.
<html>
tag should include language_attributes()
.bloginfo()
to fetch the title and description.wp_head()
. Plugins use this action hook to add their own scripts, stylesheets, and other functionality.Here's an example of a correctly-formatted HTML5 compliant head area:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title(); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
wp_footer()
call, to appear just before closing body tag.<?php wp_footer(); ?>
</body>
</html>
wp_link_pages()
to support navigation links within posts.wp_link_pages()
to support navigation links within posts.wp_link_pages()
to support navigation links within a page.wp_link_pages()
to support navigation links within a post.the_time( get_option( 'date_format' ) )
.previous_post_link()
and next_post_link()
.function_exist()
check to avoid redeclaration errors. Ideally all functions should be in functions.php.the_search_query
or get_search_query
(echo or return the value). For example:<h2><?php printf( __( 'Search Results for: %s' ), '<span>' . get_search_query() . '</span>'); ?></h2>
from Theme Development (Wordpress Codex)
wp-config.php
file to see deprecated function calls and other WordPress-related errors: define('WP_DEBUG', true);
. See Deprecated Functions Hook for more information.