Files
wp-bootstrap/views/pages/page.html.twig
magdev e3e9b9f2be
All checks were successful
Create Release Package / PHP Lint (push) Successful in 1m3s
Create Release Package / Build Release (push) Successful in 1m41s
fix: make page title <h1> conditional to prevent double headings (v1.0.3)
When plugins inject content via TwigService with empty post.title,
the theme's <h1> is now skipped. Prevents duplicate headings on
plugin-rendered pages that provide their own titles.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-11 09:54:16 +01:00

23 lines
568 B
Twig

{% extends 'base.html.twig' %}
{% block content %}
<div class="container">
<article class="py-4">
{% if post.thumbnail %}
<figure class="mb-4">
<img src="{{ post.thumbnail }}" class="img-fluid rounded"
alt="{{ post.title|e('html_attr') }}">
</figure>
{% endif %}
{% if post.title is not empty %}
<h1>{{ post.title }}</h1>
{% endif %}
<div class="post-content">
{{ post.content|raw }}
</div>
</article>
</div>
{% endblock %}