Closed c3po-developer closed 2 years ago
Sorry, my fault.
The problem comes from Polylang. All CPTs except _tweetssus had a defined language. What I don't quite understand is how it worked with the external WP Query ...
Hope this can be useful to someone in the future: P
Hi! Thanks for this great addon!
I'm experiencing a strange behavior.
I have configured the field with these arguments:
And the posts of the type 'tweets_sus' do not appear. Only the posts of type 'post' and 'news_sus' appear.
If I modify it to leave it like this:
Then they appear.
The strangest thing is that if I make an independent query (With
WP_Query()
) in any place of the same website with the 3 CPTs, all the results appear and i'm setting the exact same arguments to the module.I have even modified the code from cmb2-attached-posts and I have reached the
get_objects()
function in init.php and I have verified that the arguments there, including the CPT 'tweets_sus' arrive correctly, but the get_posts() function returns only two CPT results. In the same function i try with WP_Query() and the results are wrong two.This is the strangest thing, because i'm calling WP_Query() with same params outside the module and all works.
Any suggestion will be appreciated