Yes you have to write a custom function and call it on your manage columns it will help you to get the necessary contents.
public function xxxx_get_cpt_data($post_ID) {
// $cpt_values = get_post_custom($post_ID);
global $wpdb;
$sql = "SELECT * FROM ". $wpdb->prefix. "custom_table WHERE post_ID=". $post_ID. " LIMIT 1" ;
$cpt_values = $wpdb->get_results($sql);
if ($cpt_values) {
return $cpt_values->column_name;
}else {
return ' ';
}
}
But the get_results
returns an array of objects. If you wish to get a single result than use get_var
.
If you have multiple values on the custom table go with get_results
use it like this $obj->coulmn_name;
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
- 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
- why doesn’t the_content() work in this {single-custom_post_type.php} page?
- Custom Post Type Menus
- Hiding Custom Post Type from Google?
- Display Custom Post Type Fields
- Get monthly archives for custom post type
- How to get dynamically custom post type that are under a certain category
- Custom/separate categories for custom post type
- using add_role function to make some users to create a selected type post
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Change URL of posts and also Custom Post Type
- Custom post type and taxonomy slug issue
- WooCommerce product search titles only
- Related posts in all categories of current post (custom post types)
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- Add a button or image button that calls wp functions in the wp-admin
- Adding custom post type to count in category
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Canonical url differs from custom post type archive URLs
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Getting the taxonomy
- Custom post types: change “read more” text
- Custom post type sorting: alphabetical order
- Use Pages for Custom Post Type
- Create a simple Testimonial page
- What is the best way to manage small blocks of content on my home page?
- Only looping through pages that have children or subpages
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- Custom post type rewrite url structure with taxonomy and sub taxonomy
- list articles in admin showing nested categories or slugs?
- Custom metabox with image gallery upload that won’t attach images to post
- Custom Post Type parent/child relationship rewrite rules for permalinks
- Related posts by taxonomies does not work , what could be the reason?
- Display first post of a term in taxonomy template
- How to transfer categories (default) to custom taxonomy?
- call a function when insert and update a custom post type
- How can I remove “Add new” button on custom post type
- Custom Post type archives / categories give 404
- Sorting on Taxonomy in archive page
- Front-end form submission not creating post
- link posts to custom post type
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- See the process of creating a taxonomy and tell me where I made a mistake
- Google Analytics Dashboard for WP in Custom Column
- Navigation won’t update to show full path to single post
- Custom slugs with dates & IDs on Custom Post Type