It looks like working. The post type slug is passed as a GET variable so if you want to add the code to specific post types, you can first grab the post type slug by:
if( isset($_GET['post_type']) ) {
$post_type = $_GET['post_type'];
if( in_array( $post_type, array('type1', 'type2', ...) ) ) {
add_filter( 'manage_posts_columns' , 'jam_cpt_columns' );
add_action( 'manage_posts_custom_column' , 'jam_cpt_columns_data', 10, 2 );
add_filter( 'manage_pages_columns' , 'jam_cpt_columns' );
add_action( 'manage_pages_custom_column' , 'jam_cpt_columns_data', 10, 2 );
}
}
you can specify your desired post types in the array.
Related Posts:
- Programmatically publish a post (custom post type) with custom fields
- Echo all meta keys of a custom-post TYPE
- Ordering Posts List By Taxonomy Terms?
- Change slug of registered custom post type in child theme
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- Add Settings to Custom Post Type
- WordPress Custom Shortcode Conflicting with Media Library
- Creating a gallery custom post type?
- Custom post type archive with pagination?
- Displaying Post Title on Post Edit page?
- Custom user role not working as expected
- Rewrite on custom post type permalink not working?
- Custom post type archive with dynamic taxonomy filtering – is it possible
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Add common Post Actions to Custom Meta Column
- Make custom post type display as a page
- Adding menu_order to CPT admin page
- Custom post type with specific category structure
- Is it possible to make tag archive page specific to Custom Post Type?
- reference the current category being used in the category.php page
- Multiple portfolios with one custom post type?
- CPT Meta Searching
- Custom Post Type not visible on category page
- XML-RPC and Custom Post Types
- How to enable a custom post type to custom user role in WordPress
- Rewrite URL for only archive page (custom post type)
- Show Post Thumbnail In Custom Post From Other CPT
- Is possible add class for last post of Custom Post Type?
- how to get URL of media uploaded to WordPress via media_handle_sideload()
- How to customize a permalink (URL) structure?
- Custom post type unintentionally called in every page
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Multiple featured sizes / images / excerpts
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- modrewrite not working on my Apache setup
- search also in taxonomy, tags and custom fields
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- Querying Two Custom Post Types with OR Not Working
- How can I get the number of custom post type posts that have a specific attachment image set?
- how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
- Not sure if I should create multiple custom post type [closed]
- Adding custom taxonomy in same menu place with two custom post types
- Multiple pages for posts?
- ‘exclude’ argument is not working with get_posts for a custom post type
- Ascending Order is not Working in Custom Post Type Listining
- How can i display movies in profile page, added by an user?
- How to get a custom type post data when it has a connection with another custom type post?
- attach CPT data to a taxonomy
- Full RSS feeds for Custom Post Types
- ajax response not recieving
- How to build a WordPress post review system beside commenting
- Creating a non-hierarchical Taxonomy that behaves like categories
- Custom Post type content within a slider
- Where are post type columns stored in database?
- Categories won’t appear on custom post type
- Custom Post Type with Configurable Sidebar via ACF
- How to get xml file for a single post type?
- How to change single custom post template by custom taxonomy?
- “Custom Field” to Excerpt field” for pages? [closed]
- Let users upload image(s) to the post from front end
- Insert custom fields to a custom post type
- Get_the_term_list inexplicably adds values in foreach
- Single parent post lists child posts with pagination
- How to order custom posts by one of the custom fields value, ‘date’?
- Function to allow single post template based on custom taxonomy?
- Custom Post Type, Custom Taxonomy Template: How to get current taxonomy name?
- A sports wordpress website
- Custom post category name showing empty
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- How can I write a function that would update any missing specific post metadata?
- Not saving custom taxonomy while using ajax
- Dynamic template page calling shared taxonomies CPT or Plugin post type : how to clone taxonomy for plugin + set up dynamic shortcode
- Show a custom post title in another custom post type in Meta box
- remove duplicate name submenu link from the custom post type
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- Convert category to custom post type
- How do I insert a custom post type query after a certain number of recent posts and then resume recent posts?
- Create and Update 2 CPT sequentially
- how to display new private message to users?
- Custom Function to redirect singular post if specific meta field is empty
- Custom taxonomy with custom post type archive page
- Multiple non-hierarchical custom taxonomies frequently used terms showing up in first selected taxonomy box
- Help with Travel Guide Setup
- Show custom post type under last posts configuration
- Custom post type taxonomy template and URL confusion
- Custom Post save causes 500 error
- Optimise custom post type queries
- Loop with Custom Post Type and Taxonomies
- Archive page of filtered posts
- Custom post type child of custom post type
- delete custom post type using a submit form
- wp_get_archives(); Change output of link
- Problem with custom post type search
- Allow certain part of a page to be easily updated for client?
- Custom post type – columns order
- Custom taxonomy labels won’t display
- Query custom type posts by array of IDs
- How to add to taxonomies to a post type
- Custom plugin contact form connecting to mailchimp API
- Update Custom Field daily within 7days