By using post_type
parameter of WP_Query to specify all types of posts you want to get (or replace the array with 'any'
to just get everything):
$my_custom_post_types = array( 'post', 'carrots' );
$args = array(
'cat' => $Cat_ID,
'posts_per_page' => $Posts,
'post_type' => $my_custom_post_types
);
$cat_query = new WP_Query($args);
You’ll need to change 'carrots'
to the name of your custom post type.
Related Posts:
- Front end post editing using a form
- Get posts based on meta key/value
- Set relationship between custom_post_types
- How to list custom taxonomy categories?
- How to intercept publish post for a custom post type “event”
- clients list using wordpress
- How to add relationships between custom post types?
- Custom taxonomy query for a custom post type
- How to do a custom bookmarks post type?
- How do I add media to a custom post type?
- Is flush_rewrite_rules necessary when creating a custom post type? Why?
- Custom Post Type – Archive page title
- [Plugin: Posts 2 Posts] Changing display order of connections
- How to display Custom Taxonomy of Custom post type
- Custom Post Type Meta Boxes
- associate custom post type with tags with specific pages
- how to alter args of a custom post type
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- How to display recent posts added in several custom post types
- Help with CPT template pagination
- Get categories and descriptions from custom post type
- Dynamically add / duplicate custom meta in custom post types
- Comprehensively Restrict Post Type Taxonomy to Logged-in Users
- Custom post template for particular posts
- Custom Post type and Custom Field WP_Query
- Repeating posts when paginating random posts
- Order By Post Type ThenBy Taxonomy
- How to show CPTs in term archive
- Custom query to filter posts that have current post as a taxonomy [closed]
- Query/list all terms and their custom post count
- How can I make a custom post type sticky?
- Custom Post Type Dynamically Updates other Custom Post Type
- Pagination on with query_posts in custom post type template
- Get Taxonomy Term Title by it’s URL
- Number of Custom Post Types published are not being shown in the custom page
- Using meta_query and tax_query at the same time
- Post Type rewrite rule to point to custom Page/template
- Load Custom_post_type categories post with ajax
- Post author for revision not being set on update/insert
- Filtering results for post_type tells me I don’t have permission
- How to add multiple markers on the google map, at a certain meta_key and meta_value
- Why is my WP_Query outputting my entries twice?
- Optimise WP custom post type query
- Custom Post Type with Custom Taxonomy as Category
- WP_Query() with custom post type and taxonomy — get all terms?
- current-menu-item not added on page showing custom post type (rendered with archive template)
- How to move a post to different post type with all meta data?
- Custom taxonomy or custom page templates?
- Forms and WordPress Nonce
- How to detect that the save_post hook is calling the callback associated to the current edit post page only
- WordPress different templates for same type custom post (but different slug)
- Custom Post Type Advanced Slug
- Can I change the page of a Custom Post Type slug?
- Update Post Status On Woocommerce Payment Complete
- Should putting custom code in functions.php or created the plugins [duplicate]
- Trying to write shortcode with get_post_meta but isn’t working
- I can’t connect my custom jquery to wp admin
- Custom post class, generate unique id from 1 to x depending on amount of posts?
- Saving meta box data?
- How to remove /blog/ prefix for custom post types in permalinks?
- Create an user checklist system for a course plateform using ACF Pro and ACF Extended
- CPT archive with WP native/core tax/categories
- Loop all post on single.php
- Create custom post type inside other post type
- On saving Post My permalink is updated and category is removed automatically which cause the 404
- How to add specific terms in a custom post type?
- How get list of job types of simple job board plugin from code?
- Changing permalink of default Post with custom post
- get_queried_object not work in taxonomy page
- Post Click Redirect to Custom URL instead of Single Post Page
- wp_insert_post deleting previous post custom meta
- custom post type to post association in wordpress
- Attempting to create custom “post” template, getting a 500 internal server error
- custom post type single page
- custom post type single post preview for pending status
- How to create a permalink structure with custom taxonomies and custom post types
- Reuse the “category” slug for a custom post type
- Submit and edit font end custom post type
- Importing URLs of Audio Enclosures
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Edit is changing my custom’s post type parent id
- Updated from 3.8 to 4.2 and all post types changed to “post”
- Popup panel is only displaying 1 entry ignoring all others
- Custom post type single display is ommited
- Fetch post meta in the same query as the main loop
- Archive.php is not displaying tags
- Change custom post status to draft before today
- Include Custom Post Type Archive in wp_list_pages
- “regular” pages not found after changing permalink
- How to save an integer as taxonomy term?
- empty dashboard for custom role
- Get all custom_post_type posts + blog posts from one category in a single query
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- How is get_the_author connected to a custom post type?
- Get custom post type parent category
- add_filter > posts_where works partially
- How to create custom page templates with default page layout framework?
- Change post structure
- Permalinks for Custom Post Types and Taxonomies
- Group search results by post type, but having a unique heading for each section?