Hybrid classic and block templates
functions.php adds theme support for block-templates and block-template-parts. A post type with a block template in /templates (for example single-lh-portfolio.html) uses it; everything else keeps the classic PHP templates inherited from Baskerville or overridden here.
Shared markup functions
The header, footer and post furniture live in pluggable functions that both the classic templates and the block templates call, so there is one source and nothing to keep in sync by hand:
lh_baskerville_header_markup()andlh_baskerville_footer_markup()inincludes/template-parts.php: the header image, logo or site title, primary and mobile menus, search toggle, footer widget areas (with fallbacks) and credits.lh_baskerville_post_meta_markup(),lh_baskerville_sidebar_markup()andlh_baskerville_comments_markup()inincludes/legacy-post-content.php: the author box, date, categories and tags, previous/next links, sidebar and comments.lh_baskerville_breadcrumbs_markup()inincludes/legacy-breadcrumbs.php: renders core’score/breadcrumbsblock with a manually built postId/postType context on singular pages. Called once, at the end of the header markup.
Dynamic blocks
Registered on init, each a thin wrapper that captures one of the functions above:
lh/legacy-header,lh/legacy-footer,lh/legacy-post-meta,lh/legacy-sidebar,lh/legacy-comments(includes/legacy-chrome-blocks.php)lh/portfolio-toc(includes/portfolio-toc-block.php): lists an LH Portfolio root’s child entries bymenu_orderthen title. Visitors see published children only; users who canedit_postsalso see draft and private ones, marked with their status.
Block Bindings
includes/block-bindings.php registers two sources, each inactive unless its plugin is loaded:
lh/kb-entry(LH Knowledge Base): fieldsentry_type,last_updated,md_url.lh/portfolio(LH Portfolio): fieldstype,lifecycle_stage,parent_title,parent_url.
A render_block filter removes any bound block with the class lh-hide-if-empty when its bound text resolves empty or its bound href/src is blank.
Skip links
The header markup outputs the theme’s own skip link to #site-content on every page. Core’s auto-injected block-template skip link is removed (its wp_enqueue_scripts hook is unhooked and the wp-block-template-skip-link handles are dequeued at priority 100) so block-template pages do not show two. Any future block template that does not use lh/legacy-header would need its own skip link.
WooCommerce
The theme declares WooCommerce support but ships no WooCommerce templates (they were removed in 0.2.2), so shop pages use WooCommerce’s own templates inside the theme’s header and footer.