How to get posts from one category?
-
Hi,
I’m trying to build a custom loop for retrieving 8 events from the category 133:
$args = array( ‘post_type’ => ‘event’, ‘posts_per_page’ => 8, ‘category’ => 133, );
But if I change 133 for the category slug ‘highlights’ or if I leave it blank I get the full list of posts, not only the posts in category 133.
What I’m doing wrong?
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to get posts from one category?’ is closed to new replies.