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?
- custom post type metaboxes not saving
- Number of posts in the archive
- custom post data – how to
- Ordering Submenu Pages in WP 3.1
- 404 Error on form submission within custom post type
- Enable taxonomies by post type in an array of CPTs
- Override a function defined in wp-includes/comment-template.php
- PHP question: how to combine syntax?
- Custom URL redirect in WP
- Remove Quick edit for custom post type?
- wp_insert_post wrong post type [closed]
- Replace dynamically content in a custom database table when a custom post is created
- Loop increase number
- custom post for slider
- How to customize work area / admin area in a custom post type without plugins?
- Use remove_meta_box conditionally on custom post type
- ACF in wordpress
- How can I have different content for different countries?
- Change Slug of a Custom Post Type
- Excerpt function for any content
- Change “empty trash” button text?
- Assign category a default post type
- Plugin Development – Functions or Hooks?
- How to display custom field value on page?
- Navigate posts with different post type that are in the same categories
- Include php on a specific page template
- wp_trash_post action hook with custom post type
- Filter posts by tax (dropdown) and meta value
- How do I amend form data before it is saved for a custom post type
- List of all entries of custom-post-type: Add year-parameter?
- Move Genesis Single Page/Single Post Title
- Page Template Dropdown For Custom Post Types
- List Categories (wp_terms) and count posts
- Showing custom post type categories in the menu
- How to use a variable as a function name?
- What do the numbers mean at the end of add_action(‘save_post’)…?
- Running a wordpress action when a custom post type term (taxonomy category) is changed
- Show Custom Message in WordPress Admin
- How can I remove filters from custom post types?
- attach CPT data to a taxonomy
- Displaying multiple post types on home page
- Get_the_terms restrict output
- Conflict between wp_list_pages and get_posts – list pages not displaying
- Custom post type menu
- How to inherit field value from parent post into in child / sub post
- sortable columns for multiple custom post types not working
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- How to insert data into meta box from another plugin?
- Call to undefined function is_home() or any conditional tags
- How exclude or skip post type with get_next_post_link
- Create page template via functions.php?
- How do I add custom HTML to the content of an archive page’s posts?
- why post_class() function apply css classes to all other files?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- REST filters only firing when I have a param set
- WordPress custom API endpoint – how to make the request more flexible
- Prevent A Specific Custom Post Type Showing In WP Search Results Page