Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

GraphicArtisan on "Display only ONE category per "Page," for several pages."

$
0
0

I am creating a site that is currently on my localhost, so I can not provide a URL! I am using the BLANK-Theme by Chris Coyler, so the theme itself is bare.

I am trying to display only one category per page, for multiple pages. (ex. showing only DOG posts on the Dogs page, showing only CAT posts on the Cats page, etc.)

At first I was using:

<?php query_posts('cat=13'); ?>

Which technically works, but after further research I found that this isn't a very good solution (I also think it's messing with my Loop, since Page body content is no longer displaying). I looked into "pre_get_posts," but I read that that only works for the homepage -- and the homepage won't be displaying ANY posts.

I don't want to use Category pages because I feel that I don't have as much control over them; at the moment I have several different Page templates because each page functions a little differently and requires different features. I would like for each page template to display a different category (there are only 4 pages).

Is there a good way to do what I am looking to do? I have been researching for a while but I'm not entirely sure what I should be looking for. Thank you!


Viewing all articles
Browse latest Browse all 8245

Trending Articles