Skip Navigation

[Resolved] Custom data in Views

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Beda 5 years, 11 months ago.

Author
Posts
#907346

Hi

We are looking to create a view for user data that is based upon serialized data in user and post meta that links a row for a custom post type to many users. A user can also belong to multiple rows in the custom post type, hence why the meta is stored in both post and user meta. The association between the two is also complicated as it is based on a varied list of roles, that we will probably create a taxonomy for. Is there a way to do this with code utilising hooks (or functions, etc) for the views?

We have looked at doing this with our own shortcodes and writing all the code for this ourselves, just returning the results from the custom shortcode. We will use this method if this is not possible however, for flexibility, we would prefer to keep as much of the functionality within Toolset (so we can utilise the loops and conditional features, particularly) and just do the minimum in our own code, maintaining and returning the user and post meta data with our code where needed (including in the views).

Is this possible?

As an aside, we may wish to use the views to extract data from completely custom data (in tables created by third-party plugins). Is this an option to and if so, could it be done, again using hooks or another method?

Thanks.

#907687

I don't understand your first 2 questions.

Toolset, WordPress actually, does not allow connections between Users and Posts other than the authorship.
For any other kind of connection, you will need to create either Fields or Taxonomies or Posts that "mimic" users.
Only then you can connect this to Posts.

Or vice-versa you add user Fields that hold some data related to Posts, so you can create a connection

Populating either of the data sets (fields or taxonomies) with existing data of Users (or vice-versa, populating User Fields with Post Data), requires either manual input or custom code.
For advanced custom code aid, you can refer to the contractors:
https://toolset.com/contractors/

No matter how you will either require custom code or manual work to populate the connecting fields or taxonomies.

As for extracting data from Custom Database Tables with Views, this is not possible.
Toolset Views will allow querying Users, Taxonomies or Posts.
Those are all stored in either Posts, meta, taxonomy or users tables.
Only for Post Relationships we use Custom Database Tables but those are logically adapted and created by us, so they work out of the box with Toolset - as they are part of our Software.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.