You've already forked wp-bootstrap
Replace FSE block markup on the frontend with proper Bootstrap 5 HTML rendered through Twig templates. The Site Editor remains functional for admin editing while the public site outputs Bootstrap navbar, cards, pagination, grid layout, and responsive components. New PHP classes: TemplateController, ContextBuilder, NavWalker New Twig templates: 20 files (base, pages, partials, components) Enhanced TwigService with WordPress functions and globals Co-Authored-By: Claude <noreply@anthropic.com>
45 lines
1.5 KiB
Twig
45 lines
1.5 KiB
Twig
<aside>
|
|
{% if sidebar.recent_posts is defined and sidebar.recent_posts|length > 0 %}
|
|
<div class="mb-4">
|
|
<h3 class="h6 text-uppercase fw-semibold" style="letter-spacing: 1.6px">
|
|
{{ __('Recent Posts') }}
|
|
</h3>
|
|
<ul class="list-unstyled">
|
|
{% for post in sidebar.recent_posts %}
|
|
<li class="mb-2">
|
|
<a href="{{ post.url }}" class="text-decoration-none">{{ post.title }}</a>
|
|
<br>
|
|
<small class="text-body-secondary">{{ post.date }}</small>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
|
|
<hr>
|
|
{% endif %}
|
|
|
|
<div class="mb-4">
|
|
<h3 class="h6 text-uppercase fw-semibold" style="letter-spacing: 1.6px">
|
|
{{ __('Search') }}
|
|
</h3>
|
|
{% include 'partials/search-form.html.twig' %}
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{% if sidebar.tags is defined and sidebar.tags|length > 0 %}
|
|
<div class="mb-4">
|
|
<h3 class="h6 text-uppercase fw-semibold" style="letter-spacing: 1.6px">
|
|
{{ __('Tags') }}
|
|
</h3>
|
|
<div>
|
|
{% for tag in sidebar.tags %}
|
|
<a href="{{ tag.url }}" class="badge bg-secondary text-decoration-none me-1 mb-1">
|
|
{{ tag.name }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</aside>
|