Basic Elements of a WordPress Theme

Learn the Basic Parts of a WordPress Theme - Theme Building BlocksCustomizing WordPress themes starts with understanding the building blocks of the WordPress theme. If you’re new at customizing themes we highly suggest using child themes. Click here to read about WordPress child themes and how to use them.

In case you haven’t read our WordPress child themes article yet, WordPress child themes are separate themes that rely on a parent theme for most of their functionality. If you are using a child theme, WordPress will first check your child theme to see if a specific functionality already exists. WordPress will look for functionality in the template files as listed below in Basic Template Files. If it theme/template override doesn’t exist in the child theme, it will use the parent theme. This allows you to only add things you wish to change to your WordPress child theme and lets the parent theme handle the bulk of the functionality. This makes theme overrides easy and troubleshooting of any odd behavior as a result of a change much easier to track down.

Basic WordPress Theme Building Blocks

Basic Template Files
style.cssStyle sheet file
index.phpHome Page file
single.phpSingle post page file
archive.phpArchive or Category file
searchform.phpSearch form file
search.phpSearch content file
404.phpError page file
comments.phpComments template file
footer.phpFooter content file
header.phpHeader content file
sidebar.phpSidebar content file
page.phpSingle page file
PHP Header Snippets
bloginfo('name');
Title of the site
wp_title();
Title of the specific post or page
get_stylesheet_directory_uri();
The style.css file’s location
bloginfo('pingback_url');
Pingback URL for this site
bloginfo('template_url');
Location for the site’s theme files
bloginfo('version');
WordPress version for the site
bloginfo('atom_url');
Atom URL for the site
bloginfo('rss2_url');
RSS2 URL for the site
get_site_url();
Exact URL for the site
bloginfo('name');
Name of the site
bloginfo('html_type');
HTML version of the site
bloginfo('charset');
Charset parameter of the site
,
Previous Post
Backing Up WordPress Websites

Related Posts

You must be logged in to post a comment.
Menu