Having an issue doing a WP_Query with post_content and category__and
This is the array for my arguments for the WP_Query.
Array
(
[showposts] => 4
[paged] => 1
[post_type] => post
[post_content] => tree
[category__and] => Array
(
[0] => 6
[1] => 15
[2] => 28
)
)
I want to return the posts where they are in t开发者_JS百科he categories 6, 15, 28 and where the post_content has the word tree.
My problem is that I'm returning several duplicated results for the posts that have the word tree in it. Ideally I would like to return one.
anyone have any idea how I can fix or improve this?
I found the issue, I shouldn't have been trying to filter on post_content, but rather 's'
e.g.
Array
(
[showposts] => 4
[paged] => 1
[s] => post
[post_content] => tree
[category__and] => Array
(
[0] => 6
[1] => 15
[2] => 28
)
)
精彩评论