• Hi,
    I’m really a noob at this, but I managed to make the page that lists posts on a page, but I need it to only show certain categories on the pages. Since I am going to have several pages that have multiple post categories on them, I am hoping there is a way I don’t have to have multiple template files that say include only this category.

    I read over conditional tags and some other areas of the codex but I’m still confused. Is there a way to somehow make it do this based on something I put on the page or in the page custom field area. Like if custom area is Recipes then it only shows the posts in category recipies?

    Thanks for any help,
    Wombat

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Theme template files category.php or archive.php are used to display one category. If you need a Page that shows posts from multiple categories use a custom page template with a query posts.

    Thread Starter WombatofAvalon

    (@wombatofavalon)

    Right now I’m using the pages of posts template I found in the codex. I am not understanding how to use the query function in the right way. I can see how you can tell it to query a specific category. Can I do it so that it checks something on the page so it knows which category to specifically show?

    Or will I need a separate template for each page I’m using the pages of posts for? I was hoping to avoid that since I’m going to be doing this a few times.

    Moderator keesiemeijer

    (@keesiemeijer)

    Do you mean this Page of Posts: https://codex.www.ads-software.com/Pages#A_Page_of_Posts

    Can I do it so that it checks something on the page so it knows which category to specifically show?

    In the Page of Posts (codex) article they use a custom field to show a specific category

    Thread Starter WombatofAvalon

    (@wombatofavalon)

    okay thanks. I will play with this and see if I can get it to work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pages in Posts, specific categories’ is closed to new replies.