I found the solution i was looking for, if anyone in the future has the same question i am posting the answer.
To make a post with lets say “Status1” to show only “Status2” and hides other statuses like “Status3 and Status4” (with css):
function hidepoststatus() {
$post="Status1";
global $post;
if ( $post->post_status == 'Status1' ) {
?>
<style>
#post_status option[value="Status3"] {
display: none;
}
#post_status option[value="Status4"] {
display: none;
}
</style>
<?php
}
}
add_action( 'admin_head', 'hidepoststatus' );
Related Posts:
- Admin – create custom post status and display above table
- Put page on Archived statut after end of publication date
- Custom Post Types, slug, archive and SEO plugins
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- Using single.php from plugin folder instead of default template folder
- How to disable drafts?
- how to enable different number of revisions for different blogs when using WPMU?
- Custom Post Type Pagination Doesn’t Work in WordPress 3.4
- Unattaching images from a post
- Setting post meta data to random value during post status transition / on publish
- Post from front-end only by logged in users, form posts as “posted by:
- How to change post status from publish to draft using hook in wordpress?
- Hiding by default specific post status on backend list?
- Allow role to delete posts but block him the wp-admin
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Custom Post Status Posts viewable to the public
- Using Custom Posts with Metaboxes and Drop-downs
- add filter to “quick edit menu” in wordpress admin
- How to show featured image in custom post type dashboard post page
- What differences are there between a Privately Published post and a Draft post?
- Archive Page for Custom Post Type is not Working
- Update post status from “publish” to “trash” for half of posts
- Posts vs. Pages
- Dynamic carousel on individual posts
- Filter Custom Post Type by Category with Ajax
- how to remove dash (-) post status from post title on posts listing page wordpress
- How to add pagination in between post and comments?
- Hiding Draft Post In Admin
- Print all the tags from a custom post type Please
- Display multiple custom taxonomy values on single custom post types page?
- Show posts by a custom post author
- Custom loop pagination links not working
- Update postmeta Parent when post_status child change
- wp-cli post create & media import issues
- Search results posts_orderby and ID
- Unable to restore from backup – how to obtain old blog posts?
- Getting value from get_post_custom
- custom post template file not shown, instead all the time 404.php
- Set Default Category to Username
- show custom post type category dropdown sorting result on same page
- Custom Post Type Rewrite To Include Parent Page(s)
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- $post->post_type not working
- how can i allow users to view their own pending posts in a front-end page
- Custom taxonomy archive page problem
- Tell WP to use a specific template file in posts
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- if in category but only with post meta
- How to add convenient buttons for new custom post statuses
- Auto delete posts based on content text
- Custom home page with full post for first one only
- Is there a way getting post fields using `transition_post_status`
- Display value of custom field at the beginning of a post
- Can WordPress handle following functionalities?
- Showing posts for today and future
- add_rewrite_rule and template redirect not working
- Custom post type slideshow background images to insert in a plugin
- Trying to exclude custom posts based on date, while sorting by custom field
- Changing permalink of WordPress
- Hook save_post_cpt not triggered when custom fields are modified
- Show Last Revision Of Post That Has A Published Status On Single Page
- Alt text attributes not showing over portfolio images
- Adding an option to post editor to show a site disclaimer or message
- Added a ACF field to custom page and want the results to show as a column in admin
- WordPress Pods Custom Post Type – separate Media Upload folder for each custom Post Types
- How publish post from pending status
- get_next_post() not working with future post status
- post and page and custom post type
- My posts page is missing the page title
- Show custom post category for single post
- How can change header text in post careate/edit form
- How to get meta data from custom category name
- Add Categories To Custom Post
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- how to redirect page after delete post inside a post page?
- Permalink base only for posts
- Difference between modified post and new post
- Creating widget – ask for selecting a post in the admin panel
- issue in wordpress auto delete post and redirect to another 1
- wp query custom orderby not custom field
- Customizing individual images on posts
- Custom Single Post Type not referring to single-post-type.php File
- How to modify specific parts of a post content in WordPress
- Include post on external custom site
- Run Jquery Script after delete post in front end
- “Current” class on a singular page menu item with custom post types?
- Successive creation of over 1000 posts causes 404?
- How can I allow users (subscribers) to download selected posts into a single PDF? (RESOLVED)
- Choose options via url
- Custom Post Type Pagination 404 Error (if paged>=2) [duplicate]
- Display ONLY Latest Post From Several Categories
- custom post type single page template not working
- Display post structure in function
- Default post type doesn’t display in url
- Do anything on post_status change [duplicate]
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields