add_action( 'manage_posts_custom_column', 'id_data' );
add_filter( 'manage_posts_columns', 'id_column' );
function id_column( $defaults ) {
$defaults['id'] = 'ID';
return $defaults;
}
function id_data( $column_name ) {
global $post;
switch ( $column_name ) {
case 'id':
echo $post->ID;
}
}
Related Posts:
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Custom post type functions.php if statement on action
- remove custom post type permalink
- Sort search results by post type
- Custom post status not working
- How do I filter the excerpt metabox description in admin?
- How to correctly get post type in a the_title filter
- Make the ‘all’ filter default instead of ‘mine’ in a custom post type
- White screen error for a custom theme
- How do you output custom code between posts in the loop?
- Remove “Get Shortlink” button in admin of custom post type
- Check Title Unique Or Not and If not error message and dont save
- How would go about if I just want a temporary function?
- Add html to cpt main page / admin edit.php
- register_taxonomy and register_post_type does not work [closed]
- Filter categories of posts with checkboxes
- WooCommerce product search titles only
- How to customize a permalink (URL) structure?
- Displaying custom taxonomy in the admin list of a custom post type
- WordPress sort search results by custom order
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- WooCommerce sort products by the actual product width(not the shipping width)
- Cannot save CPT meta box
- Allow users to create posts without logging in?
- Filter Posts from the Main Query
- Redirect to another page using contact form 7? [closed]
- Create new custom post and post category of same name
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Add an Outside Wrapper to my Header and Make it Full Width
- login_headertitle is deprecated since version 5.2.0
- Custom post type’s posts are not showing anywere but in xml sitemap
- post_content is stripping HTML when adding a new post? [closed]
- Post visibility option to theme front-end for author to select?
- Function to add custom HTML into head in custom post-type list page
- Custom Form / Search with Custom Post Type Data
- Save_post – Warning: Cannot modify header information
- Post Click Redirect to Custom URL instead of Single Post Page
- pricefilter without WooCommerce
- Stored meta from attachment, video length?
- Keep br tags from stripping
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Filter wp_dropdown_categories Per Post Type
- How to display *block number* instead *date value* on WordPress posts?
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- Admin Post Update Redirection to Posts Screen
- Date archives for custom post type
- modify all posts of a category to “no comments allowed”
- How to not allow custom roles to edit published custom post types?
- Disable dragging of metaboxes in custom post types?
- What hook should be used to programmatically create a post only when master post is updated?
- Append taxonomy terms as class names in markup?
- Structure for projects and clients
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- Custom search for custom post meta with pre_get_posts interferes with WP search
- Modifying date filter on admin page for custom post type to link to custom field
- Deleting Custom Post type data using mySQL command
- I did group my search results by post type, but how can i give each of them its own order?
- Change custom post type slug from plugin options
- A question on creating filters for custom posts using taxonomy
- How can I made custom taxonomies relationship?
- How to start a new post with custom Taxonomies already set?
- How to change permalink to include custom post type
- Pages are not saving due to custom post type
- Edit the_content() function so to add a div wrapper
- Number of posts in the archive
- Use remove_meta_box conditionally on custom post type
- Custom post type menu
- Get current user id
- Custom posts – tag pagination
- Adding custom post formatting options in custom post types
- Filtering the_content, but still need to display the unfiltered content inside filter
- One post auto attached to many another items
- Submit Custom Postypes from frontend
- Need help with Custom Post Types and Taxonomies
- Query filter by value in meta_value array
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Is it possible to create 2 unique titles for an Events custom post type: Upcoming Events and Past Events?
- Create posts inside CPT post
- wp delete duplicate entries of custom post types every 15 minutes
- connect users to Custom post types
- Populate custom post type/custom fields from an external database
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- Post Custom & Taxonomy 404 error
- One Post with different content, depending on a Page
- How To Display Category list from Portfolio post type plugin?
- do action inside a class is not working
- Registering an optional custom post type from a plugin
- Dropdown switching subcategories portfolio
- Filter custom post type by tags
- Settings in functions.php used by a plugin
- Custom metabox value not saving
- Cannot modify a registered custom post type rewrite slug
- Allow authors to create article image
- Inserting two categories
- Rewrite a filter as shortcode (or something like that) to use anywhere in CPT
- How to delete unnecessary custom post types in the UI
- Advise on Custom Taxonomies and Structure
- Comments are not working on Custom Post Type