finally found the solution when i enter all the custom post status to public it declare the post_type to default post as global so applied filter to change the global post_type based what type request get in URL
function publishPress_allPost_pre_get_posts( &$wp_query )
{
if ( is_admin() && array_key_exists( 'post_type', $_GET ) ) {
$wp_query->set( 'post_type', $_GET['post_type'] );
add_filter( 'the_posts', 'publishPress_allPost_the_posts', 10, 2 );
}
}
function publishPress_allPost_the_posts( $posts, &$wp_query )
{
$wp_query->set( 'post_type', $GLOBALS['post_type'] );
return $posts;
}
Related Posts:
- How do I check if a posts status is set to draft or pending?
- Auto-generated posts not showing in backend (but being counted!)
- Update postmeta Parent when post_status child change
- How to define which register_post_status goes to which register_post_type?
- Published post auto change status to pending after 90 days
- Custom Post type to Woocommerce Product type
- How to display custom field in product description?
- Show custom post status when logged out
- Custom Post Status & Taxonomies
- WP_Query Pagination on single-custom.php
- Make featured image required
- previous_post_link() and next_post_link() with a custom post type?
- Setting a custom sub-path for blog without using pages?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Attach a Custom Post Type to a Woocommerc product as a variation or add-on [closed]
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- Add metabox with media uploader in a custom post type [duplicate]
- Custom Post Status not showing in Custom Post Type ALL view
- Custom Posts on Different Pages
- taxonomy list display custom post count
- How to solve suspected memory issue in custom WordPress loop?
- automatically create taxonomy with same name as post title
- Wp-query causing problems with the_content();
- Custom Post Type by user
- How to create posts (not post template) to be displayed on projects page?
- same archive template for different custom post
- Set meta_query only for specific post type
- Woocommerce query specific product from specific category
- How can I show a custom post type for users in the authors.php file?
- Blog page showing same content as homepage
- Need help targeting a custom post type with conditional tags
- How to limit post of custom post status?
- how to get URL of media uploaded to WordPress via media_handle_sideload()
- Show the same Article Available in Other Categories
- Show custom post type filtered by category
- Display random posts, but omit the post it is on?
- Get latest 3 posts from multiple CPT in one query
- Meta query for custom post type ignored in main query
- Hiding posts by other users and non-logged in
- Get related posts of child term of custom post type
- Woocommerce search pagination not working
- WooCommerce Customer Role Delete Custom Post Type
- Removing all post statuses from a Custom Post Type
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Sort posts in loop by the WooCommerce Membership of the author
- wp_insert_post wrong post type [closed]
- Can I change my post type to anything and my site still work?
- display posts of custom post type with custom taxonomy
- How to Query in WordPress which shows Alphabetic Posts?
- Post Query not working
- How to filter url on post submission?
- Different structure/content for posts from a custom post type
- creating files for displaying different custom post type posts with paging
- is it possible in a custom post, create custom fields as well whitin?
- custom taxonomy listing returns no posts
- How to controll the Posts post type and general wondering about WP data structure
- Display author box on just certain category posts?
- How to fetch posts that are stored in the different table than (default) wp_posts?
- Am I mixing up the concept of posts pages and categories?
- Display custom post counts for author , not default posts
- If/Else child list for Custom Post Type single template within loop?
- Is it a connection or relationship between 2 custom post types?
- redirect after submiting post for review
- How to achieve a multi-taxomony layout with posts?
- i need to have a tab with gategory post
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Enforcing a rigid reusable template structure for similar posts?
- Auto delete pages/posts without views
- WordPress retrieving $post based on random key in $_POST
- $_POST from a Meta Box
- WooCommerce – Custom related product (Spareparts)
- User Archive page for Custom Post Type – Pagination Issue
- WooCommerce change
- Custom post Query and WordPress Post Query Clash
- Search in multiple specific post types
- Multiple Custom Post Type with different Taxonomies
- update a posts of other custom post type
- Links Image in “Catalog” Page to Posts
- How to create a discussion post when a custom post is created?
- Filter By Term Not Working – Custom Post Type
- how to display notifications in the wordpress menu when a new post is published
- Editor role isn’t seeing specific post type posts with only post_type parameter
- date archive future posts
- Get Non-Paginated Index of Post in Paginated Query
- How can draft post after 1 year
- Custom Post Types and Posts are mixed
- How to create content automatically when a post is published?
- query_post causes the posts to be loaded twice on load more posts
- Hook only specific post type
- Custom Post Type permalink not working on new posts
- Retrieving IDs of child pages which are in a different post type
- Turn post into simple slideshow
- post in a lightbox?
- Query multiple post of which one by taxonomy
- Cannot exclude particular post from loop of custom post type
- the_content() stop images being pulled through
- Apply text based styling done for a single post in WPBakery to all posts / create a template out of it [closed]
- Different layouts for different post types in wordpress?
- How to create a job post by email parsing? [closed]
- Post content in bootstrap modal