Open sheyad opened 6 years ago
Hi @sheyad, this is in fact the exact same process as for displaying category name in post single (single.html) as you asked on our website here.
Once you've added your post's category name to your webservice post data using the _wpak_postdata filter (see examples here), this category name is available both in single.html and archive.html templates (as _post.my_categoryname for example if you named your additionnal post data _my_categoryname in _wpak_postdata filter).
archive.html example:
<% _.each( posts, function( post ){ %>
...
<%= post.my_category_name %>
...
<% }); %>
Hope this helps.
How to show category name in each post on archive.html page?