Hi, I’m currently building a food menu of a site. I’ve created a custom template for this page. I also have a custom post type ‘foods’ where I wanna display the posts of it by its custom taxonomy ‘food-category’.
So far I’ve managed to display all posts but what I want is to filter it by its category which is listed at the sidebar.
I’ve been searching but really can’t find a clear answer.
I haven’t tried this code yet but I think it will work…
<?php query_posts( 'cat=33' ); ?>
If it does work, how could I make the ‘cat=33’ dynamic? I mean it will depend on the category that will be clicked.