Template Files

Customize any layout in YOOtheme Pro, like the main theme layout or the blog pages as well as the header, menus, modules and positions.

A child theme can override any template file in YOOtheme Pro. Simply include a file of the same name in the child theme folder, and it will override the equivalent file in the yootheme folder when your site loads. It’s recommended to copy the original file to the child theme and start modifications from there.

You can also include files in the child theme that are not included in YOOtheme Pro but are recognized by WordPress. See the Template Hierarchy documentation for more information on how WordPress determines which template to use.

The following lists give an overview of all template files in YOOtheme Pro.

Theme Templates

Here is a list of the main template files in YOOtheme Pro which serve as entry points to your WordPress site.

Template Description
index.php This file renders blog pages and is used if no other matching template file is found.
archive.php This file renders archive pages.
search.php This file renders search results pages.
single.php This file renders all single posts.
page.php This file renders all pages.
404.php This file renders 404 pages (not found).

The the actual theme layout can be found in the header.php and footer.php files. All abovementioned template files include the header.php file before their content output and the footer.php file afterwards.

Template Partial Description
header.php Renders the toolbar, header, top and main sections of the theme.
footer.php Renders the sidebar, bottom and footer sections of the theme.

The following template partials are used across the template files.

Template Partial Description
comments.php This file renders comments and is included by the single.php file.
commentsform.php This file renders the comment form and is included by the comments.php file.
templates/pagination.php This file renders the pagination and is included by the index.php, archive.php and search.php files.
templates/post/content.php This file renders posts and is included by the index.php, archive.php and single.php files.
templates/post/content-search.php This file renders results in search pages and is included by the search.php file.
templates/post/content-none.php This file renders a message if posts cannot be found. It is included by the index.php, archive.php and search.php files.
templates/post/content-page.php This file renders pages and is included by the page.php file.

Layout Templates

The following template files render the widget area layouts.

Template Description
templates/section.php This file renders the section markup for the top and bottom areas.
templates/sidebar.php This file renders the sidebar markup for the sidebar area.
templates/position.php This file renders the area markup, i.e. decides whether the widgets are placed within a grid.
templates/module.php This file renders the widget markup.

Header Templates

Here is a list of template files which render the header.

Template Description
templates/header.php This file renders the header markup and its navigations.

The following template partials are included by the header.php.

Template Partial Description
templates/toolbar.php This file renders the toolbar.
templates/header-mobile.php This file renders the mobile header markup and its navigation.
templates/header-logo.php This file renders the logo.
templates/search.php This file renders the search toggle and field.
templates/socials.php This file renders the social icons.

Here is a list of template files which render the different menus and navigations.

Template Description
templates/menu/menu.php This file renders the menu markup.
templates/menu/nav.php This file renders menu items for the vertical nav.
templates/menu/navbar.php This file renders menu items for the navbar.
templates/menu/subnav.php This file renders menu items for the subnav.
templates/breadcrumbs.php This file renders the breadcrumb navigation.
YOOtheme Pro Documentation