I found a solution
add_action('edit_form_advanced', 'add_to_admin_cpt');
function add_to_admin_cpt() {
global $post;
if ($post->post_type == 'catalog') {
//doing my own stuff
}
}
Related Posts:
- Hook for post and page load
- How to enqueue scripts on custom post add/edit pages?
- How do you use a CPT as the default home page?
- Calling a Function After New Post Creation for a WordPress Custom Post Type?
- How to Debug the ‘save_post’ Action?
- Adding a drag and drop re-ordering from a custom post type default list [closed]
- get_query_var() not working in pre_get_posts
- Unregister post type from child theme
- Filter for “get_post_type_archive_link()”
- How to add a button to custom post type’s posts-page
- How to hook into the CPT’s title placeholder?
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- Admin Post Update Redirection to Posts Screen
- How often do you need to register_post_type?
- How to create notification on frontend using heartbeat api for multiple custom post types
- How to set a custom post type post as static front page?
- With what hook can I address all posts from all custom post types when they are published?
- specify meta_key / meta_value condition for prev_post_link and next_post_link
- Hook when adding or editing a specific custom post type? [closed]
- remove_action conditionally for Custom Post Type
- What hook should be used to programmatically create a post only when master post is updated?
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- How to register custom post types in a plugin?
- Add information above a custom post type listing of all posts page
- Remove “Get Shortlink” button in admin of custom post type
- Custom Blog Post Listing in Genesis Sample Child Theme
- Set a default category – if the user didn’t select one- before creating a post
- Can’t unregister parent theme’s CPT from my child theme
- Get Post Primary Category
- Hooking in to an archive page?
- Add custom column in custom post type edit page
- Custom post type permalink returns bad url
- Insert Multiple Post with Same Publish Button
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- Validate custom fields before save using WordPress Rest API
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Posts are duplicating on wp_post_update
- Limit number of custom posts per taxonomy
- How to Create Columns with WordPress and CPTUI display page ?
- A form that can save/edit after first input
- Filter Posts from the Main Query
- Categorise Custom Post Types
- How can I add a filter to a particular post format?
- Is there any way to get list of all possible filter hooks for all post types?
- Cant get paginations on single.php to work with my custom post types
- Add a custom text to admin footer in a Custom Post Type page
- Get rid of “trash can” for custom post type
- Custom Meta fields Update hook?
- wp_trash_post action hook with custom post type
- Add an Outside Wrapper to my Header and Make it Full Width
- sortable columns for multiple custom post types not working
- How check if a post is saved from backend or frontend?
- How to build a WordPress post review system beside commenting
- WordPress hook after post content and meta update
- ACF for custom post type archive pages: which hook to use?
- WordPress hook which triggers on post import
- Assigning alternate single-{cpt} template based on blog_id in multisite
- providing access to post_id or post inside functions.php
- Before saving post hook
- Shortcode is displaying the content on top of the page [duplicate]
- Creating alternate meta box context locations
- Make a custom column sortable by a value from a different custom post type
- wordpress post_where set only for my costum post type
- comments hooks on custom post type
- Catch and display error on save_post action
- How to recover the post ID earlier in the WP admin hook action “firing” sequence?
- Limiting actions only to edit.php page for specific custom post type
- Using `set_transient()` when saving a custom post type
- Using publish_{custom-post-type} hook for custom post type to update meta doesn’t work
- Best way to fix bad count on All | Mine | Published
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Plugin Development using classes – Public & Private Callbacks
- Custom Post Type action on post update
- Show Post Types customized in Template Page
- In child theme, add CPT to custom taxonomy registered in parent theme
- Store a value in global scope after init hook is fired
- Getting a Post ID to show its content in a Popup
- Changing CPT permalink
- Update main post with same category when creating custom post to update the modified date
- Hook create / update post
- Sort custom post archives by a meta value from a different custom post type?
- Correct way to register custom post type from external php file?
- How to store additional data that is related to core data
- call a function when insert and update a custom post type
- Execute code only after user clicks ‘update’ button for CPT being edited
- Custom Fields as Post Type Options
- Adding Information To All Posts Screen
- do action inside a class is not working
- Filter Content on all Post Types
- Customizing a plugin function using a hook
- Hook only specific post type
- Add number in increment of one to DIV ID
- Create action running on trashed_post hook to modify post_meta value
- How to string lines from the_content() hook in WordPress?
- Adding some HTMl code as posts doesn’t work but it does if it is added directly in the file?
- Add a background image into a post [closed]
- Redirect drafted post of custom post type to URL?
- Modifying post_type_link hook messing up edit function for a custom post
- Change CPT Edit Target Link for Admin List