Hi,
I'm working on displaying a post grip of featured posts on a category archive page. The featured posts are set via a custom field inside the category, where I input the IDs of posts I want to show. Unfortunately, this does not query the selected post. When I manually add the post ID in the code it does work, so the general code itself works fine.
How can I get the value from the term custom field 'term.featured_post_id' in order to query the correct posts? See my current code below, where I'm using: p: '{{ term.featured_post_id }}'
{% set args = { post_type: 'post', posts_per_page: 6, order: 'DESC', p: '{{ term.featured_post_id }}' } %}
{% set posts = mb.get_posts( args ) %}
{% for post in posts %}
<div class="featured-article">
<figure><img src="{{ post.thumbnail.large.url }}" width="{{ post.thumbnail.large.width }}" height="{{ post.thumbnail.large.height }}" alt="{{ post.thumbnail.large.alt }}"></figure>
<h3>{{ post.title }}</h3>
<a href="{{ post.url }}"></a>
</div>
{% endfor %}