Are these custom taxonomies or the regular categories?
if they are just categories you should use:
$args = array(
'posts_per_page' => -1,
'post_type' => 'news',
'orderby' => 'date',
'order' => 'DESC',
'category_name' => 'Alumni'
);
$loop = new WP_Query( $args );
<?php while ( $loop->have_posts() ) : $loop->the_post();?>
...
<?php endwhile; ?>
if you want to use it by id
use:
'cat' => 160
instead of
'category_name' => 'Alumni'
Related Posts:
- WP Query with categories only shows one post and ignores the category
- Only show current category post
- Custom Post Type + Category archive
- Display all posts in a custom post type, grouped by a custom taxonomy
- WP_Query by a category id and a custom post_type
- How to use a custom post type as front page?
- Display several random posts, but make sure a condition is met
- category__in not working on custom post type
- how do I group content in magazine-style ‘issues’?
- Retrieving 3 latest post from each of 5 different custom post types
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- How to create posts (not post template) to be displayed on projects page?
- WP_Query post at custom position
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- List all custom post type posts from a given category?
- Query for posts in 2 taxonomies
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Getting all custom posts with a certain category
- How do I Use Nested Loops of Custom Post Types for MultiSite Blogs using WP_Query()
- WP_Query and using a variable for ‘cat’=> in the args array = WP Bug?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Impossible to get Attachments Outside WordPress?
- Query Custom Post Types & category_name?
- Lists Posts from CPT that match the Title of the Page
- CPT posts listed by category with custom rewrite URL, please help!
- Help Structuring Query for Archive Pages
- Loop on front-page.php
- wp_query to find posts by year and month
- Querying Term Posts in Loop
- WP_Query | ‘post_type’ doesn’t work
- Filter by custom taxonomy slug on a custom post type
- Pagination on category page with custom post types
- Query custom post type in the loop
- Loop through Custom Post Type, and then show children within each iteration
- Very Slow Page – How to Optimize # of Queries?
- Can I create a loop with multiple post types and specify different $args for each post type?
- WP_Query orderby modified to include custom meta changes
- Linking to the most recent post in a Custom Post Type
- How to make sure content doesn’t display if selection is empty
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Show custom post type filtered by category
- forming WP_Query for posts of all post types but from specific categories
- Custom post type, organized by categories
- What’s the WP way to load remaining custom posts?
- Why is my category template ignoring post type?
- pagination not working for category.php (custom post types in categories)
- WP Query post__in not returning correct results
- Sort posts in loop by the WooCommerce Membership of the author
- Tag page only display 10 posts
- How can I group posts by months and years?
- Multiple Custom Post Type queries, how to DRY it up
- Custon Content within WordPress Loop
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- get_pagination not working on a custom post type query (using WP_Query)
- WP_Query with custom post type ID
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- display posts of custom post type with custom taxonomy
- List categories, subcategories and posts from custom taxonomy and custom post type
- postsperpage value not being applied
- Display the current post in browser as the first post in a loop (for a slideshow)
- Create query for both custom post type and category
- Display post from custom post type
- foreach loop inside the loop creating duplicates in output
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- How to fetch posts that are stored in the different table than (default) wp_posts?
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- CPT archive page – show one post from each taxonomy term
- What is the most efficient way to execute recursive complex queries?
- Pagination Not Working When Used With WP_Query() `offset` Property
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- How to output custom post type title on custom page with category next to it?
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Pagination for a cpt filtered with a category
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- subtracting the current post form then whole loop, which is generating all CPT titles
- Custom Post By Category
- Mix Facebook and Twitter feed into custom posts
- sorting in wp query based on custom field value
- Custom post Query and WordPress Post Query Clash
- Excluding category from loop not working
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Strange behavior on WP_query
- get_post_meta for Custom Post Type ( CPT )
- Is it possible to add query parameters on the archive page?
- Loop with Custom Post Type and Taxonomies
- display news with pictures 3 small and one large (loop)
- How can I pull information from my loop and divide them seperately?
- category_name not working in WP_Query
- Fallback if statement based on the number filtered from it
- Query Custom Post Type by Tag
- Fourth page of custom post type archive page does not exist
- Catergory args causing loop not to show
- Using tax_query to get single post per category
- Is it possible to make is_category() recursive?
- How can I show posts with the same tag?
- How to insert a post from a different post type after every nth post
- Complex Custom Loop with Includes