page.html
header

Custom templates

Custom templates may be defined for single posts, pages or custom post types ( CPTs ).

They override the template hierarchy.

Custom templates may need to be defined in theme.json

Template name formatExample & template nameUsage
$customfeatured-image-leftDisplays the featured image to the left of the post content. Used when the featured image is a narrow portrait image.
$customoutput-inputDebugging template parts or content
page-$slugpage-template-hierarchyTemplate specifically for the template-hierarchy page
page-$idpage-2Template specifically for post ID 2 – initially the sample-page
pageThis page
singularUsed if single / page is not found
indexDefault template

See Template hierarchy for the full hierarchy.

Navigation

Page List

Page Tree ( shortcode )

© Copyright Herb Miller, Bobbing Wide 2021