Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter noggster

    (@noggster)

    nvm, I got it to work with a normal WP_query, must have botched it up when I tried earlier.

    However it now loops all posts from all categories, is there anyway I can get the category in question from some “category_slug” or category_id function?
    What I want is something like this:

    $args=array(
          'post_type' => 'customposttype',
          'category_name' => category_id() // <-- this
          );
    $my_query = new WP_Query($args);

Viewing 1 replies (of 1 total)