@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=155026>
  a sioc:Post ;
  dc:title "Themes and customising" ;
  dcterms:identifier 155026 ;
  dc:modified "2026-11-19T07:24:49Z"^^xsd:dateTime ;
  dc:created "2026-11-19T06:25:47Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-image-gallery/themes-and-customising/> ;
  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-image-gallery/">LH Image Gallery</a></li></ul>
<h2 class="wp-block-heading">Block themes</h2>



<p class="wp-block-paragraph">The plugin registers a Gallery Photo block template (WordPress 6.7+). It uses the theme&#8217;s <code>header</code> and <code>footer</code> template parts around the Gallery Photo block, which is full width with no space above it. A version edited in the Site Editor comes first, then a theme&#8217;s own template with the slug <code>lh-image-gallery-photo</code>, then the plugin&#8217;s. The template is never offered in the editor&#8217;s Template control.</p>



<p class="wp-block-paragraph">The Gallery Photo block is server-rendered and hidden from the inserter, because it only makes sense on a photo page. It shows the photo edge to edge, at most as tall as the screen, then its caption, Previous and Next links, a link back to the post and a View full size link. The text stays inset by <code>--lh-image-gallery-gutter</code> (default <code>5%</code>). Its page heading is the photo&#8217;s label (caption, alt text or &#8220;Photo n of N&#8221;), hidden on screen but there for screen readers and search engines. Its styles set layout only; colours and type come from the theme.</p>



<p class="wp-block-paragraph">The block has the id <code>photo</code>, and every link to a photo page (gallery links, Previous and Next, the prerendered next page, old lh-image-url redirects) ends in <code>#photo</code>, so the page opens with the photo at the top of the screen. Canonical, Open Graph and structured data URLs leave it off. A theme with a sticky header can keep it clear of the photo by setting the <code>--lh-image-gallery-scroll-margin</code> CSS custom property (default <code>0</code>).</p>



<h2 class="wp-block-heading">Classic themes</h2>



<p class="wp-block-paragraph">A classic theme shows the photo in place of the post content in its normal single template. A theme can supply its own <code>lh-image-gallery-photo.php</code>.</p>



<h2 class="wp-block-heading">Filters</h2>



<p class="wp-block-paragraph">All filter names start with <code>lh_image_gallery_</code>.</p>



<ul class="wp-block-list">
<li><code>lh_image_gallery_is_indexable</code>: whether a photo page may be indexed. Receives the default (true when the photo has a caption or alt text), the attachment ID and the post.</li>



<li><code>lh_image_gallery_return_endpoint</code>: the endpoint, <code>photo</code> by default. Change it if a page has a child page with that slug.</li>



<li><code>lh_image_gallery_return_anchor</code>: the fragment links to photo pages end with and the photo block&#8217;s id, <code>photo</code> by default. Return an empty string to link without one.</li>



<li><code>lh_image_gallery_return_linked_destinations</code>: which image link settings get a photo page, <code>media</code> and <code>attachment</code> by default.</li>



<li><code>lh_image_gallery_return_template_content</code>: the block markup of the registered template.</li>



<li><code>lh_image_gallery_return_template_slug</code> and <code>lh_image_gallery_return_block_name</code>: the template slug and the block name.</li>



<li><code>lh_image_gallery_return_cache_version</code> and <code>lh_image_gallery_return_rewrite_schema</code>: bump to rebuild every cached gallery list, or to flush rewrite rules once on every site.</li>



<li><code>lh_image_gallery_init_plugin</code>: return false to switch the plugin off without deactivating it.</li>
</ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Image Gallery
Block themes



The plugin registers a Gallery Photo block template (WordPress 6.7+). It uses the theme&#8217;s header and footer template parts around the Gallery Photo block, which is full width with no space above it. A version edited in the Site Editor comes first, then a theme&#8217;s own template with the slug lh-image-gallery-photo, then the plugin&#8217;s. The template is never offered in the editor&#8217;s Template control.



The Gallery Photo block is server-rendered and hidden from the inserter, because it only makes sense on a photo page. It shows the photo edge to edge, at most as tall as the screen, then its caption, Previous and Next links, a link back to the post and a View full size link. The text stays inset by --lh-image-gallery-gutter (default 5%). Its page heading is the photo&#8217;s label (caption, alt text or &#8220;Photo n of N&#8221;), hidden on screen but there for screen readers and search engines. Its styles set layout only; colours and type come from the theme.



The block has the id photo, and every link to a photo page (gallery links, Previous and Next, the prerendered next page, old lh-image-url redirects) ends in #photo, so the page opens with the photo at the top of the screen. Canonical, Open Graph and structured data URLs leave it off. A theme with a sticky header can keep it clear of the photo by setting the --lh-image-gallery-scroll-margin CSS custom property (default 0).



Classic themes



A classic theme shows the photo in place of the post content in its normal single template. A theme can supply its own lh-image-gallery-photo.php.



Filters



All filter names start with lh_image_gallery_.




lh_image_gallery_is_indexable: whether a photo page may be indexed. Receives the default (true when the photo has a caption or alt text), the attachment ID and the post.



lh_image_gallery_return_endpoint: the endpoint, photo by default. Change it if a page has a child page with that slug.



lh_image_gallery_return_anchor: the fragment links to photo pages end with and the photo block&#8217;s id, photo by default. Return an empty string to link without one.



lh_image_gallery_return_linked_destinations: which image link settings get a photo page, media and attachment by default.



lh_image_gallery_return_template_content: the block markup of the registered template.



lh_image_gallery_return_template_slug and lh_image_gallery_return_block_name: the template slug and the block name.



lh_image_gallery_return_cache_version and lh_image_gallery_return_rewrite_schema: bump to rebuild every cached gallery list, or to flush rewrite rules once on every site.



lh_image_gallery_init_plugin: return false to switch the plugin off without deactivating it.

""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1>, <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261118t193100-themes-and-customising> .

<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> .
<https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261118t193100-themes-and-customising> rdfs:seeAlso <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261118t193100-themes-and-customising&feed=lhrdf&format=turtle> .
