Hi, I would like to use the if statement using the MB view. I want to show a text depending on the category name. For example, the post category is == bootstrap then shows something to display. I tried it but I got an error. It works well in the other fields but I got an error work when using the category/term.
Notice: Undefined index: term_id in /home/kirbkobz/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-views/src/Fields/Taxonomy/Renderer.php on line 14
{% for post in query.posts %}
<div class="snippet-card">
<a href="{{ post.url }}">
<h3>{{ post.title }}</h3>
</a>
<p>{{ post.date | date( 'd M Y' ) }}</p>
<!-- show when the category is == to bootstrap -->
{% if term.taxonomy == "bootstrap" %}
<p>Bootstrap</p>
{% else %}
<p>No Bootstrap</p>
{% endif %}
</div>
{% endfor %}