@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?post_type=lh-portfolio-doc&#038;p=148031>
  a sioc:Post ;
  dc:title "Block templates" ;
  dcterms:identifier 148031 ;
  dc:modified "2026-09-21T17:14:46Z"^^xsd:dateTime ;
  dc:created "2026-09-21T16:51:51Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-2015/block-templates/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-2015/">LH 2015</a></li></ul>
<p class="wp-block-paragraph">LH 2015 declares <code>block-templates</code> support (but not <code>block-template-parts</code>, which would make WooCommerce serve its own template parts). WordPress then looks for a block template before the PHP hierarchy, and uses one when it is at least as specific as the PHP template it would otherwise use. Where none exists, the PHP template is used exactly as before.</p>



<h2 class="wp-block-heading">Bound templates</h2>



<figure class="wp-block-table"><table><thead><tr><th>Post type</th><th>Template</th><th>Source</th></tr></thead><tbody><tr><td>lh_governance_doc</td><td>single-lh_governance_doc</td><td>LH Governance Documents (register_block_template)</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Checked on Princes Park Touch in September 2026: that is the only block template registered there, and no templates or template parts are saved in the database.</p>



<h2 class="wp-block-heading">Header and footer parts</h2>



<p class="wp-block-paragraph"><code>parts/header.html</code> and <code>parts/footer.html</code> each hold one dynamic block, <code>lh-2015/site-sidebar</code> and <code>lh-2015/site-footer</code>. These call <code>lh_2015_render_sidebar_column()</code> and <code>lh_2015_render_site_footer()</code>, the same functions <code>header.php</code> and <code>footer.php</code> use, so the chrome has a single source. Inside a part the masthead and footer are divs, because the part&#8217;s own <code>header</code> and <code>footer</code> elements are the landmarks.</p>



<p class="wp-block-paragraph"><code>css/block-templates.css</code>, loaded only on block-template requests, gives <code>.wp-site-blocks &gt; main</code> the geometry of Twenty Fifteen&#8217;s content card at each breakpoint. Post titles and content in block templates get the <code>entry-title</code> and <code>entry-content</code> classes so Twenty Fifteen&#8217;s typography applies.</p>



<h2 class="wp-block-heading">Adding a template for another post type</h2>



<p class="wp-block-paragraph">Reference the parts by slug with <code>tagName</code> header and footer, and put the content in a <code>main</code> group. A block template overrides a PHP template of the same specificity, so a <code>single-{post_type}</code> block template for a post type that LH 2015 already has a PHP template for (gatherpress_event, lh-place, lh_comps_game_post, lh_crm_enquiry_post, lh_rpt_post_type, lh_vpt_post_type, lh-advertisement, product) would replace that PHP template.</p>



<p class="wp-block-paragraph">Post types on Princes Park Touch that currently fall back to the generic <code>single.php</code> and could benefit from a bound template: lh_presentation, lh_kb_entry, lh_tasks-task_post, lh_comps_grade_fmt and gatherpress_venue.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH 2015
LH 2015 declares block-templates support (but not block-template-parts, which would make WooCommerce serve its own template parts). WordPress then looks for a block template before the PHP hierarchy, and uses one when it is at least as specific as the PHP template it would otherwise use. Where none exists, the PHP template is used exactly as before.



Bound templates



Post typeTemplateSourcelh_governance_docsingle-lh_governance_docLH Governance Documents (register_block_template)



Checked on Princes Park Touch in September 2026: that is the only block template registered there, and no templates or template parts are saved in the database.



Header and footer parts



parts/header.html and parts/footer.html each hold one dynamic block, lh-2015/site-sidebar and lh-2015/site-footer. These call lh_2015_render_sidebar_column() and lh_2015_render_site_footer(), the same functions header.php and footer.php use, so the chrome has a single source. Inside a part the masthead and footer are divs, because the part&#8217;s own header and footer elements are the landmarks.



css/block-templates.css, loaded only on block-template requests, gives .wp-site-blocks &gt; main the geometry of Twenty Fifteen&#8217;s content card at each breakpoint. Post titles and content in block templates get the entry-title and entry-content classes so Twenty Fifteen&#8217;s typography applies.



Adding a template for another post type



Reference the parts by slug with tagName header and footer, and put the content in a main group. A block template overrides a PHP template of the same specificity, so a single-{post_type} block template for a post type that LH 2015 already has a PHP template for (gatherpress_event, lh-place, lh_comps_game_post, lh_crm_enquiry_post, lh_rpt_post_type, lh_vpt_post_type, lh-advertisement, product) would replace that PHP template.



Post types on Princes Park Touch that currently fall back to the generic single.php and could benefit from a bound template: lh_presentation, lh_kb_entry, lh_tasks-task_post, lh_comps_grade_fmt and gatherpress_venue.
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
