Hi,
actually an easy task: I would build a archive for a cpt in views.
I use a custom query, but the args post_per_page, orderby and order does'nt take affect.
Here is my view:
<div class="pbgrid">
{% set args = { post_type: 'mycpt', posts_per_page: 5, orderby: 'title', order: 'ASC' } %}
{% set posts = mb.get_posts( args ) %}
{% for post in query.posts %}
<img src="{{ post.thumbnail.thumbnail.url }}" width="{{ post.thumbnail.thumbnail.width }}" height="{{ post.thumbnail.thumbnail.height }}" alt="{{ post.thumbnail.thumbnail.alt }}">
{{ post.title }}<br>
{% endfor %}
</div>
Curiously, if I change the post_per_page, orderby and order args, I can see the change if I debug the quere with Query Monitor Plugin. But the content on the archive page is always ingoring the args.
Any Idea?
Kind regards,
Ole