As long as Pods creates standard custom post types, you can simply update the arguments passed to WP_Query . The$post_type
parameter will allow you to filter the results based on the specified post type (string) or post types (array).
$latest = new WP_Query( array(
'category_name' => $request->query_vars['category_name'],
'posts_per_page' => 1,
'post_type' => array ( 'post', 'your_custom_post_type' ),
) );
Related Posts:
- WP_Query by a category id and a custom post_type
- Exclude a category from WP_Query
- WP_Query ignores post_type in category view
- category__in not working on custom post type
- List with categories, subcategories and posts of custom posttype
- New WP_query in template not working with CPT+category on some pages
- WP Query group/order by category name
- List all custom post type posts from a given category?
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- WP_Query with custom post_type and cat retrieving unwanted posts with the custom posts
- Query Custom Post by Category
- Loop through categories and create tab for each
- Getting all custom posts with a certain category
- Query Custom Post Types & category_name?
- Show Post Count of a Category
- CPT posts listed by category with custom rewrite URL, please help!
- Querying Term Posts in Loop
- Pagination on category page with custom post types
- How to show CPTs in term archive
- showing custom post types of a certain category only
- Show custom post type filtered by category
- forming WP_Query for posts of all post types but from specific categories
- WP Query with categories only shows one post and ignores the category
- Why is my category template ignoring post type?
- WP the_posts() on single-cars.php get category link
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- List categories, subcategories and posts from custom taxonomy and custom post type
- WP Query results showing posts outside of category ID
- How to get Custom Post Type with Categories wise in WordPress using wp_query
- Create query for both custom post type and category
- How to properly use Categories with Custom Post Types
- How to output custom post type title on custom page with category next to it?
- Custom Post By Category
- Only show categories that have posts within custom post type
- Query the title of the page to show posts with matching category in the loop
- Only show current category post
- How can I generate a list of post-type specific categories?
- Can’t seem to filter wp_query by current category ID
- Custom Post Type + Category archive
- category_name not working in WP_Query
- Get all custom_post_type posts + blog posts from one category in a single query
- Using tax_query to get single post per category
- Are custom posts included when getting a categories’ posts?
- Is it possible to make is_category() recursive?
- WP Query filtering by custom category not showing all relevant posts
- Very Slow Page – How to Optimize # of Queries?
- orderby in custom WP Query does not work
- Should I use custom taxonomy or custom post type
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- How to detect filter in URL in Category page?
- Can I create a loop with multiple post types and specify different $args for each post type?
- Set menu active state for custom posttype and category, given custom taxonomy term
- Query custom post type by category slug
- Combining sorted and random CPT
- How to change post featured image using a custom field of category?
- How to add post_type=value when editing that post type in the WordPress admin?
- Display CPT posts based on specific taxonomy
- CPT Archive with core Category
- Can’t query tag and post_type at the same time
- Group posts by custom post type
- Setting proper query for multiple custom admin filters
- shortcode to show custom post types by category
- Unable to retrieve any posts of CPT in wp-admin
- WP_Query: include custom post type only with specific meta value
- Pagination on a custom post type loop
- Display all posts in main category and 1 subcategory
- Replace li Items with divs with classes
- WP_Query orderby modified to include custom meta changes
- WordPress custom loop filter by meta_key and value with serialize data
- Returning a list of custom post types excluding those without a specific meta_value
- query private custom post type
- Get posts from a custom post type by child categories of a parent category
- Display custom post type from dynamic custom field
- Query/list all terms and their custom post count
- Custom Post Type Archive Page Filtering
- Getting posts under the custom post type ui category
- How to make sure content doesn’t display if selection is empty
- Show category ID on custom post type
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Filtering WP_Query Dynamically on the Front-End
- Show one item per category of a custom post type
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Storing posts from query and accessing later via AJAX call
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- get_posts() with custom post type does not work outside page.php
- Genesis filterable portfolio isotope [closed]
- Posts from all the categories are being displayed instead of particular category
- Query custom post type with tags
- wp_query check if integer exists in custom field’s array
- Get parent categories of custom post type
- convert custom query to wp_query
- Wrong request query on cpt and tax
- Getting a PHP Notice when using Pods with WPML [closed]
- Previous/Next Link by Meta Value in CPT
- How to query_post custom posts within default taxonomy?
- Conditional Statement custom post type category
- Randomize Posts. Skip the first post in ascending order