I'm not sure if this is a Meta Box problem or a wpDataTables problem. I'm trying to create a datatable of posts in a custom post type. When configuring the table in wpDataTables, it shows all of the normal WP fields for my CPT (ID, date, title, etc.) but doesn't show any of the fields configured in Meta Box. There are currently 990 posts in that CPT.
Screenshot of CPT posts list (CPT "referral"): https://p115.p3.n0.cdn.getcloudapp.com/items/geubl78r/58129dd1-313d-4d62-95fd-049fb9df6975.jpeg?v=86dc9e85c41cd88b9a1ac9c572da806c
Screenshot of Meta Box custom fields for CPT "referral": https://p115.p3.n0.cdn.getcloudapp.com/items/E0uY7elp/7e67c5a4-f699-4a6c-9ceb-18f17c75b409.jpeg?v=776d0ffb73420c5d01715a164d462ee4
Screenshot of sample custom field in CPT "referral": https://p115.p3.n0.cdn.getcloudapp.com/items/xQubpoge/bcf27b06-9d63-41a6-b0bc-05fad812a44d.jpeg?v=22db2dfd5e52d6ad4130801ea115a068
Screenshot of wpDataTables table setup, selecting "query to WordPress database": https://p115.p3.n0.cdn.getcloudapp.com/items/6qu8Wo7Q/a4ceccb7-5bea-4900-aa10-8df1188f71a3.jpeg?v=44f1434e8ad87e3e3adffd198d595f02
Screencast showing that none of the custom fields for CPT "referral" are shown in wpDataTables column configuration: https://p115.p3.n0.cdn.getcloudapp.com/items/NQuwzAr5/5b5fcf2a-bba9-48d0-9edb-99f1327e3942.mp4
Thank you for any help you can provide! 🙂
Thank you for using our plugin.
It looks like the plugin wpDataTables search in the database, table
wp_postmeta for the meta key (field ID) to create a table/chart. There is no data in the table
wp_postmeta when you just create meta boxes and custom fields, please try to add field value to some posts then update the post and re-check it.
Thanks, Long. I already have 990 posts in that CPT, so there's plenty of values in the custom fields. 🙂
It's a premium plugin so please share a copy of this plugin via this contact form https://metabox.io/contact/. I will help you to check it.
Thanks again for your help! I will submit a contact message. I would also be happy to provide you with WP admin access to the site where it's all installed. 🙂
Thank you for all your troubleshooting! I really appreciate your efforts to help me, which proves why Meta Box is a great investment. 🙂
If you were to create a datatable using MB Views without wpDataTables, do you have any thoughts on a good way to set that up? Is there a particular table or charting library that you would use and how would you configure that for use in MB Views?
With my 3 years of experience as a web developer, I would recommend creating the table with the use of WordPress query and HTML tags. If you're a non-programmer, you can use the WordPress table plugins which are available on the internet. So of the most popular table plugins are: