Deprecated: Freemius::maybe_activate_bundle_license(): Implicitly marking parameter $license as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/plugins/update-urls/libs/fs/includes/class-freemius.php on line 8038

Deprecated: Freemius::set_license(): Implicitly marking parameter $license as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/plugins/update-urls/libs/fs/includes/class-freemius.php on line 12666

Deprecated: Freemius::switch_to_blog(): Implicitly marking parameter $install as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/plugins/update-urls/libs/fs/includes/class-freemius.php on line 15873

Deprecated: Freemius::_activate_addon_account(): Implicitly marking parameter $bundle_license as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/plugins/update-urls/libs/fs/includes/class-freemius.php on line 18348

Deprecated: Freemius::_store_site(): Implicitly marking parameter $site as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/plugins/update-urls/libs/fs/includes/class-freemius.php on line 19903

Deprecated: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/timber/timber/lib/URLHelper.php on line 282

Warning: Undefined variable $related_documentation in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/single-doc.php on line 32

Deprecated: Twig\Loader\FilesystemLoader::__construct(): Implicitly marking parameter $rootPath as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 37

Deprecated: Twig\Environment::createTemplate(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Environment.php on line 446

Deprecated: Twig\Node\Node::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/Node.php on line 39

Deprecated: Twig\Parser::addImportedSymbol(): Implicitly marking parameter $node as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Parser.php on line 274

Deprecated: Twig\NodeVisitor\SafeAnalysisNodeVisitor::intersectSafe(): Implicitly marking parameter $a as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php on line 137

Deprecated: Twig\NodeVisitor\SafeAnalysisNodeVisitor::intersectSafe(): Implicitly marking parameter $b as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php on line 137

Deprecated: Twig\TokenStream::__construct(): Implicitly marking parameter $source as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/TokenStream.php on line 28

Deprecated: Twig\TokenStream::expect(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/TokenStream.php on line 71

Deprecated: Twig\Node\BlockNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/BlockNode.php on line 24

Deprecated: Twig\Node\Expression\ArrayExpression::addElement(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/Expression/ArrayExpression.php on line 59

Deprecated: Twig\Template::displayBlock(): Implicitly marking parameter $templateContext as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Template.php on line 162

Deprecated: Twig\Node\PrintNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/PrintNode.php on line 25

Deprecated: Twig\Node\IfNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/IfNode.php on line 24

Deprecated: Twig\Node\ForNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/ForNode.php on line 28

Deprecated: Twig\Node\ForLoopNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/ForLoopNode.php on line 23

Deprecated: Twig\Node\Expression\FilterExpression::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/Expression/FilterExpression.php on line 20

Deprecated: Twig\Node\BlockReferenceNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/BlockReferenceNode.php on line 24

Deprecated: Twig\Node\IncludeNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/IncludeNode.php on line 25

Deprecated: Twig\Node\SetNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/SetNode.php on line 24

Deprecated: Twig\Node\Expression\Filter\DefaultFilter::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/nicedesi/docs.micro-sites.uk/wp-content/themes/webdev/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php on line 32
Taxonomy Archives Template – Code Bank
[ald_default calltag=true]

CODE BANK

a place to bank your code

Taxonomy Archives Template

Last Updated: August 4, 2026

First, create a taxonomy-framework.php file to handle taxonomy archives:

<?php
/**
 * The template for displaying Framework taxonomy archives
 */

$context = Timber::context();

// Get the current taxonomy term
$context['term'] = new Timber\Term();

// Get the posts (snippets) associated with this taxonomy
$context['posts'] = Timber::get_posts();

// Render the Twig template
Timber::render('taxonomy-framework.twig', $context);

Code Snippet

Next, create the taxonomy-framework.twig template. This template will display the snippets in a card format.

{% extends "base.twig" %}

{% block content %}
  <div class="container mx-auto px-4">
    <h1 class="text-3xl font-bold mb-6">{{ term.name }}</h1>

    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
      {% for post in posts %}
        <div class="card bg-white shadow-md p-4 rounded-lg">
          <h2 class="text-xl font-semibold mb-2">
            <a href="{{ post.link }}" class="text-blue-600 hover:text-blue-800">
              {{ post.title }}
            </a>
          </h2>
          <p class="text-gray-600">{{ post.excerpt }}</p>
          <a href="{{ post.link }}" class="inline-block mt-4 text-blue-600 hover:text-blue-800">
            Read more
          </a>
        </div>
      {% endfor %}
    </div>
  </div>
{% endblock %}

Important Notes/Warnings

After setting this up, make sure to flush your permalinks by going to Settings > Permalinks and clicking Save Changes.

Top