Support » Plugin: WP-dTree » Node grouping based on custom fields?
1 year ago
Does anyone know how to group child nodes into a single branch based on custom field values?
You would have to edit the plugin source code. There’s a ton of files but the general pattern is pretty simple. Each tree type goes through the same stages:
Parse Settings / Context -> build enormous database query -> parse results into a useful data structure (basically a huge array) -> pass to wp_dtree_build to generate and cache the output.
So look at the (multi-stage) database queries I use to grab all the data and figure out how you need to change that to look for whatever fields you have.
Let me know when you’ve got something working!