When you are adding custom post types the best option to create wpDataTable from them is to create MySQL table with custom query that will fetch all data that you need.
You can also try to create wpDataTable with wpDataTables constructor option "I want to create a table based on my WordPress data (posts or pages, and post meta or taxonomy values)" but sometimes when you are adding custom post types they can't be seen in the list because of the way how they are added by these plugins.
Can you please provide me a temporary WP-admin login for your site so I can take a look and give you my suggestion. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
The easiest way for you to test it is to create a standard post with a custom meta key beginning with an underscore "_" and see if you can access this meta value with your interface for "I want to create a table based on my WordPress data (posts or pages, and post meta or taxonomy values)"
If you try to create custom post meta key with underscore in the beginning Wordpress wouldn't let you because that is the way wordpress distinct user created keys from the others. We needed to add this limitation because if we allowed all the meta_key values to be listed you will have 35080 options in
Choose the posts properties that you would like to have as columns in the table
which will make it unusable.
From this point options would be to create query without constructor (in phpMyAdmin for eg) and use it with "Add from data source" -> MySQL option or to create custom solution for you which will listed only those meta_keys that you wanted and not the others .
I use Toolset (http://wp-types.com) to create custom post types.
Toolset automatically names/creates meta fields for post relationships.
Their name structure for this field is: _wpcf_belongs_custom-post-type-name_id
When building queries with wpDataTables I am unable to see any meta field that begins with an underscore "_"
This makes it impossible for me to create any queries for all my custom post types where I want to display related post data.
Can you provide a solution for this?
Hi Privattina,
Thank you for the purchase.
When you are adding custom post types the best option to create wpDataTable from them is to create MySQL table with custom query that will fetch all data that you need.
You can also try to create wpDataTable with wpDataTables constructor option "I want to create a table based on my WordPress data (posts or pages, and post meta or taxonomy values)" but sometimes when you are adding custom post types they can't be seen in the list because of the way how they are added by these plugins.
You can find more information about this in our - Text documentation - Video tutorial
This is what I did and I wanted to report that wpDataTable don't show post meta keys if it begins with an underscore "_"
(Using the technique: "I want to create a table based on my WordPress data (posts or pages, and post meta or taxonomy values)")
Hi Privattina,
Can you please provide me a temporary WP-admin login for your site so I can take a look and give you my suggestion.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Ok, good luck with the new release.
Will it address my topic about fields beginning with "_" ?
The easiest way for you to test it is to create a standard post with a custom meta key beginning with an underscore "_" and see if you can access this meta value with your interface for "I want to create a table based on my WordPress data (posts or pages, and post meta or taxonomy values)"
Hi Privattina,
If you try to create custom post meta key with underscore in the beginning Wordpress wouldn't let you because that is the way wordpress distinct user created keys from the others. We needed to add this limitation because if we allowed all the meta_key values to be listed you will have 35080 options in
which will make it unusable.
From this point options would be to create query without constructor (in phpMyAdmin for eg) and use it with "Add from data source" -> MySQL option or to create custom solution for you which will listed only those meta_keys that you wanted and not the others .