Skip to content
Discussion options

You must be logged in to vote

Hey @Iain-g

Try this in Components/ListSearchResults/Partials/_results.twig:

{% for post in posts %}
  Post Type: {{  post.type }}
{% endfor %}

post.type works because post is a Timber\Post object.
But also {{ post.post_type }} would work alternatively, think you just missed the post 😅.

Good evening!
Aaron

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Iain-g
Comment options

Answer selected by Iain-g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants