You write the wrong code
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('posts_per_page' => '5',
'paged' => $paged,
'tax_query' => array( array('taxonomy' => 'news-categories',
'field' => 'slug',
'terms' => 'cbs-news')
)
);
You can also take help in WP_Query
Related Posts:
- How to get post content by calling ajax?
- How to show all posts of the category in wordpress?
- Get the ID of the latest post
- Retrieving 3 latest post from each of 5 different custom post types
- How to get only one category of custom post type?
- Quickest way to get last or oldest post date – WP Query
- Combine query_posts() and get_posts() into single query
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- How to query_post custom posts within default taxonomy?
- Show a Category X’s custom post type on Category X archive page?
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Multiple (two) category postings on the same page.
- How to properly use Categories with Custom Post Types
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Custom post type archive page filters
- Custom post type data not displaying If I select the category from the dropdonw
- Modify default Related Posts Code to Custom Post Type
- Query the title of the page to show posts with matching category in the loop
- Display 2nd category, only once, as sub-heading, in the loop
- How can I list custom post by custom category?
- How do I correctly query posts from a post ID?
- show custom post’s post in two different divs [duplicate]
- Add Category names to post lists of custom post type
- Display a query with multiple post types and same relationship on a single page
- Order by & include array by specific post ids
- Get category id from post id of a custom post type
- How to call a custom post with get_posts() instead of query_posts()?
- Add filter to wp_list_categories and query what type of taxonomy-terms it use?
- Query post types with multiple keys
- List all custom post type posts from a given category?
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Get permalink and title by post name?
- Taxonomy structure of Sport site
- Get all posts WHERE custom_field is LIKE value
- get custom post type categories
- Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
- How to display recent / random posts by its category
- reference the current category being used in the category.php page
- Search doesn’t find tags or categories in custom post types
- Querying Term Posts in Loop
- Get Post Primary Category
- Add category attribute to custom shortcode
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Posts from all the categories are being displayed instead of particular category
- Display content based on a users login
- Conditional Statement custom post type category
- Categories sorting
- How can I make my custom posts appear in their assigned category url?
- child of post type (custom)
- Allow user to set custom order to a list of custom taxonomies?
- forming WP_Query for posts of all post types but from specific categories
- will post_id ever change? Can I safely use post_id for custom queries?
- PHP variable not regenerating when publishing multiple posts at the same time
- Custom Post Types with a common category for a blog listing
- How do you create a custom template to display a category with an image and related posts below?
- Category.php template for custom posts
- Reworking function for counting custom post type posts count
- Category archive in with conjunction with custom post type is empty
- List Posts By Custom Taxonomy
- How to Display Posts From Category Within a Custom Taxonomy?
- post-per-page and offset not working
- How to Make infinite loop of post
- Need help deciding on a taxonomy
- Category Icon on custom post type
- postsperpage value not being applied
- Get child categories of custom taxonomy category?
- Create query for both custom post type and category
- Get terms for a specfic post from multiple taxonomies in custom post type
- Custom Post type showing up in loop, regular posts are not showing up
- Displaying taxonomies as category links within sidebar and creating pages for these
- Custom post category name showing empty
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- How to show related posts of category on post within custom posttype
- Trying to list years (for a filter) but not all years display
- get_posts wont produce a list of custom type from a given category [duplicate]
- Sudden 404 pages on product category archives
- Convert category to custom post type
- How can I display a specific category on Front-Page
- How to seperate posts by categories?
- WooCommerce change
- Adding categories to custom post type in permalink
- Custom Post Type is not respecting assigned categories
- Help with Travel Guide Setup
- update a posts of other custom post type
- Project Category Heading
- Getting Custom post category from Form
- How can I generate a list of post-type specific categories?
- Optimise custom post type queries
- Front end page submission form does not attach custom post type
- Best way to structure article and issue relationship for CPT
- Custom Post Type used for FAQs Accordion
- Category slug not showing for Custom Post Type
- Get a list of categories ids
- category page template for custom post type
- How do I display the index position of a post from a custom post type?
- Return Custom Post Type Categories
- Query custom type posts by array of IDs
- Using tax_query to get single post per category
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]