Gateway incorporates elegant style with user friendly customizer options making it perfectly suited for a variety of Grav users. With rock solid development and flexible integration, the Gateway theme is sure to be a favorite for first time Grav users and experienced developers alike.
Hi, it took me a while to realize that for SimpleSearch and Archives to work properly the default category for each blog post has to be "blog".
Now the reason I'm writing this issue is, that the related pages are displayed by category instead of tag by default in this theme. The RelatedPages Plugin uses Tag for relations by default as well.
This is the code I'm using now:
{% if related.taxonomy.tag %}
<p class="jp-relatedposts-post-context">
{% set related_tags = array_intersect(related.taxonomy.tag, page.taxonomy.tag) %}
{% if related_tags %}
Shares Tag
{% for tag in related_tags %}
{% if tag %}
"{{ tag|capitalize }}" {% if not loop.last %}, {% endif %}
{% endif %}
{% endfor %}
{% endif %}
</p>
{% endif %}
Hi, it took me a while to realize that for SimpleSearch and Archives to work properly the default category for each blog post has to be "blog". Now the reason I'm writing this issue is, that the related pages are displayed by category instead of tag by default in this theme. The RelatedPages Plugin uses Tag for relations by default as well.
This is the code I'm using now:
See https://github.com/getgrav/grav-theme-gateway/blob/develop/templates/partials/relatedpages.html.twig#L16 for comparison
Edit: Updated code so it only shows tags that are shared between blog post and related post