The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WP – Show posts of a category on click

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #183577

    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.



    ( “”)

    this is what I’m after to..

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.