Thread Starter
luKkw
(@lukkw)
So I found one imperfect solution, but it worked and suited enough my needs :
within wp-dtree-pge.php, below
– $pageresults = get_pages(array(
I just added
– ‘post_type’ = > ‘MYCUSTOMPOSTTYPE’,
without changing anything else.
The WP-dTree Pages widget now would just search for MYCUSTOMPOSTTYPE custom post types to fill the list.
I could not make all options work, but these ones perfectly do:
– folders are links
– highlight selection
– open to selection
– sort by “Menu Order”
It’s imperfect so if there still is a better way to proceed, I’ll take it ! 😀
Thank you for this solution, do you think it could be possible to have 2 trees for 2 custom post types.
Thanks again,
Thread Starter
luKkw
(@lukkw)
I’m pretty sure it is possible but you’ll have to change either the plugin code (which is highly above my skills) or use (and sacrifice) another wp-dtree-XXX.php (like the category one).
In this last solution, I suggest trying to copypaste the whole code of wp-dtree-pge.php to the one you’re willing to sacrifice. Unfortunately I do not remember if it is necessary to change something somewhere else.
Plugin Author
ulfben
(@ulfben)
… wouldn’t it be easier to just use the WP-dTree Archive widget and use the Specify Post type-setting?
Thanks for the reply.
I used the archive widget to set the post type and works ok but with the archive functionality but not like pages (with subpages and custom order). I modified the pages file to use with custom post type and it works nicely. But soon I will be needing multiple trees for multiple post types.
I cloned the whole plugin and changed all the function names but doest work. Upon activation only one version works.
This a really great plugin by tha way.