I now that WP_Query can query by post_type and category but i need to get data from custom post type or from category which is standard post type. Adding category to my custom post type is not an option. Any suggestion how to aproach this?

  • Here's a really good link to all the available args available for WP Query. Mar 20 '13 at 9:57
  • Problem is that I have to get from custom post type (everything) and normal posts from category. Standard query will get my post which ar in custom post type and in this particular catergory.
    – GeekDaddy
    Mar 20 '13 at 10:13

Found solution

    $posts = array_merge($posts1, $posts2);
    function cmp($a, $b) {
         return strcmp($a->post_title, $b->post_title);
    usort($posts, 'cmp');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.