Question About get_posts Parameters
-
Let’s say I have a WordPress site with 10 posts and I want to find what posts are tagged “news”. However, I only want to look for the tag in posts 1, 2, 3, 4, 5, and 6. I don’t care about posts 7, 8, 9, and 10. Will these arguments return ONLY posts tagged “news” in the collection of posts I specified?
$args = array(
“tag” => “news”,
“include” => “1,2,3,4,5,6”
);As a follow up, what if I have a collection of 50 posts and 10 tags? Are there any performance issues I need to be aware of when using $args with very specific parameters?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Question About get_posts Parameters’ is closed to new replies.