How To Use WP_Query To Get The Custom Post type Posts With Keywords

You actually need to pass the post type to your WP_Query arguments as well.

By default, post_type is set to post

A few notes:

  • caller_get_posts is long time depreciated, you should use ignore_sticky_posts

  • You should make sure that you have post ID’s before passing it to post__in. Passing an empty array to post__in will return all posts regardless

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)