Get current category
-
Hi all,
I’m using this code to get posts by a tag, now I want to use it to get posts by the current page category.
$recent = new WP_Query(array( 'tag' => 'Reel', 'posts_per_page' => '4', 'offset' => '0' )); while($recent->have_posts()) : $recent->the_post();
Does anyone have any idea how to get the current category and then what I need to replace tag => reel with?
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get current category’ is closed to new replies.