When we create categories and show them in the list of categories, they usually show all categories created, whether with posts or not.
It is normal for you to hide in the list of categories a category that is empty or category without any post. We will use the logic function of the wapkiz "if" combined with the wapkiz tags "%count%" of the category that shows the number of posts in a given category.
[*blog_category]o=nl||(*if %count%>0)<li>%name%</li>(/if)[/blog_category]
NOTE: Remove asterisk on the code
In the example above, only the categories that have above 0 posts will be shown, that is, from 1 to front.
Have a happy weekend and until another instance.
This post was made at the request of a reader, leave your opinion or ask for an article and we will pass it on.
0 Comments
Leave a Reply