So it’s possible to use an inclusive OR in get_posts as following, which will show all posts in category 1 or 2.
<?php $posts = get_posts(‘numberposts=10&category=1,2’);
foreach($posts as $post) : ?>
<?php endforeach; ?>
How do you show posts that are in BOTH categories 1 and 2?
- The topic ‘How to apply with exclusive OR on get_posts’ is closed to new replies.