WordPress Sage Theme Framework Documentation Translation - Theme Template Structure and Extension Methods

Sage's theme templates are built on HTML5 Boilerplate and support ARIA roles and hNews microdata format. The theme contains files that can be extended like a normal WordPress template structure. The theme's main template files are listed below.

404.php
404 Error Page
base.php
All template files are extended on this file.
index.php
Archive pages (blog pages, category archives, author archives and other archive pages)
page.php
single page
single.php
Single article page
template-custom.php
Example of a customized page template

followingtemplates/The content template file contained in the is where most of our customizations are made.

comments.php
Commentary module
content-page.php
page.phpHowever, the content template included in the single page
content-single.php
Content templates included in a single post pagesingle.php
content.php
index.phpContent templates included in the home page.
entry-meta.php
content-single.phpThe metadata template contained in the
footer.php
base.phpThe footer template included in the
head.php
 base.phpThe HTML contained in the
header.php
base.phpThe top-of-page template included in the
page-header.php
The header template included in the page.
searchform.php
Search box template
sidebar.php
base.phpThe sidebar template included in the

Extended Sage Theme Templates

Even though the Sage theme uses its own method of wrapping the theme, normal WordPress template inheritance can still be used, for example:

  • make a copy of index.php because of author.php, you can then create a new author archive page.
  • make a copy ofindex.php because of home.phpThen you can create a customized home page, provided you don't have a static home page set up inside the reading settings.
  • make a copy of index.php because of archive-gallery.php can then be used for galleryThe article type creates a new archive page.
  • make a copy of page.php because of front-page.phpThen you can create a new custom static home page.
  • make a copy of page.php because of page-about.php It is then possible to create a new custom page template for the page with the alias about.

The theme wrapper documentation describes in more detail how to create a new base.phpfile, but if you need to customize it based on an existing theme base.php, copy base.php as base-.phpThat's all it takes. Alternatively, you can also add a new file to thebase.phpThe customization of base.php is achieved by using conditional functions in the

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *