Documentation › Layout Inheritance

Layout Inheritance

Layout inheritance refers to the way that your layout customizations flow down through a hierarchy to the individual pages and posts on your website. Customizations to a layout are inherited by any uncustomized child layouts. This inheritance works automatically.

The Blog Index layout is at the top of the hierarchy. Your arrangement and settings of wrappers and blocks for Blog Index apply to all other layouts, pages, and posts, unless you override that inheritance by customizing layouts beneath it in the hierarchy. You may want to think of it as a cascade, similar to CSS—layout and styles cascading from the top of the hierarchy to the bottom, with the potential to be overridden with more targeted styling.

If you have a static home page, it is not included in the hierarchy. You can make it look like any other layout by cloning that layout, but subsequent changes to the layout you cloned will not be applied to the static home page. See these instructions to set up a static home page.

If you want the same design across your website, customize only the Blog Index layout, and let its customizations apply to your entire site. However, if you want to make a type of webpage on your site have a different layout, even if it’s to add only one block, you customize that layout. You can customize layouts down to specific pages and posts.

The following illustration shows how any layout can have customizations that override layout inheritance:

The children of Blog Index are Single, Archive, and 404 (“page not found”). In the illustration, both the 404 layout and the Single > Page layout (a child of the Single layout) are customized.

The 404 layout has a text block added where the site administrator will write suggestions for effective searching, and a custom code block for showing a set of posts. The Page layout has a text block added so a particular call to action or sales blurb will appear on all WordPress pages.

This article was last updated for Headway version 3.5.5.

Copyright © 2016 Vesped Inc. All Rights Reserved. Proudly Powered by Headway and WordPress