The correct action hook for printing custom column content is manage_loads_posts_custom_column
, not manage_invoices_posts_custom_column
(tested). This is because the row is itself for a loads
post type, and not an invoices
post type. Because you’re on the page for invoices
, the filter to add columns works with invoices
.
Tested:
add_action( 'manage_loads_posts_custom_column', 'invoice_custom_column', 10, 2 );
I received an error when setting the post_type
parameter to an array, so I set to loads
as a string. Additionally, pre_get_posts
is an action, not a filter, so the return $query
is not needed.
Related Posts:
- Adding ‘menu order’ column to custom post type admin screen
- Style custom columns in admin panels (especially to adjust column cell widths)
- How do I set the default admin sort order for a custom post type to a custom column?
- Replacing the title in admin list table
- Make custom column sortable
- Custom sortable columns ordered by meta-value?
- Add “Last Edited by” column to custom post type list table
- How to add custom columns to Custom Post Type admin screen
- Column sorting with emtpy meta values
- manage posts custom column is not populating data from meta boxes
- Custom admin columns for ALL custom post types
- order of date column in custom post type
- Add custom column to custom post type overview in backend
- custom sortable column
- Custom Post Type, Two categories, Two columns with Pagination
- Replacing the title in admin list table
- Remove Post Page “View Post” Link
- How can I add columns to custom post tables
- Custom Post Types: Custom columns with Title submenu?
- How to show custom (checkbox) field value in admin post list?
- Adding menu_order to CPT admin page
- Custom post admin filtering by post meta (the date)
- Admin Column Text Positioning
- How do I sort a custom post type admin column using two meta keys?
- Add Post Url to Manage Edit Screen
- Problem adding column to WC Subscription [closed]
- how to check if custom post type column already exists?
- Adding HTML tags or css classes to admin columns
- Extending AZIndex plugin to use custom post types and custom taxonomies
- WP CPT Custom Sortable Column in Admin Dashboard Sort Order Random
- How to show first name and last name in custom post type columns
- Order a custom post type admin screen by a second custom post type title
- WordPress make Grandparent and great grandparent filterable in custom columns
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- Custom columns doesn’t appear in custom post type
- How can I use this code on a custom database table?
- Problem with $post_id object’s property
- Pods CMS: How to add custom column to Adnvanced Content Type
- CPT Columns doesn’t show categories
- Getting post attchment URL to populate a CPT Admin Page Column
- Custom Columns for Custom Post Type Manager
- Make a custom column sortable by a value from a different custom post type
- Sorting custom post types in edit.php : Post disappear
- Custom sortable column with WPAlchemy
- Remove filter and view options from custom post type edit screen
- Sortable column with custom data by date
- Add Content Column to Custom Post Type backend
- Hide Published text from custom post types column
- custom filtering admin columns
- Custom sorting in post columns by ACF Pro Select Field
- Columns depending on posts count
- Making my custom column sortable
- Default custom column to off
- Change column of row action (Quick Edit) links in WP_List_Table
- Make custom post type column sortable
- Split custom post list into two columns
- How to get the posts of a custom taxonomy term
- How can I rewrite URLs to pass taxonomy and post type values to the query?
- Adding %author% in custom post type URL structure?
- Syntax to get the Nth item in a list of custom post types?
- Problem excluding category from get_next_post
- Display different gutenberg template from selected post attributes
- Display custom taxonomy as dropdown list
- WordPress is executing URL in code when called via wp_mail()
- How to use custom fields to enable sticky posts on custom post types?
- Pagination problem
- Custom meta fields for specific custom type only
- Display different custom post type each week
- How do I create a form to search a custom post type
- Setting posts per page in query_posts
- How to insert content from another Custom Post type into Post?
- How do I order multiple custom post types in the same menu position ( menu_position = 20 – below Pages)?
- Add archive slug to default post post type
- Custom Post type and permalink settings
- How to order separated Custom Post Search results
- Rewrite CPT child page URL to support query var
- PHP Code to Display Term URL & Name of a Post Under a Custom Post Type
- Problems wp_insert_post and save_posts filter
- Loop to display custom post type from a custom Taxonomy
- the_content(); of custom post type treated as an array or object
- Inserting custom fields into single.php
- How to: Add a publish immediately button when editing custom WordPress posts?
- Custom archive page for custom taxonomy and pagination issue
- Ordering by meta value not working
- Get all post under custom post type grouped by custom filed value in custom taxonomy
- Comments on posts with new custom post type redirected to another post
- Remove plugin settings from post creation page for a user role
- Set archive of custom post type like ‘posts’ page in reading settings is set
- Custom Post Type author filter not working
- Changing an item in drop down after 5 latest posts per taxonomy
- Custom Post Type categories at edit post not hierarchical
- Loading a template for a URL pattern
- Best way to insert a js script in the header with custom fields and CPT
- meta query always fails even if data is correct
- Get custom post type where taxonomy..
- Custom post type submenu sorted by specific meta_key & meta_value
- Creating Multiple Admin Widget Page with Calling One Sidebar
- Give Friend Post Management
- How to I add count of custom posts listed in a post as a prefix to its title
- Hide custom post type slug url from search engine [closed]