I've used Types to create a CPT (for a Charitable Trust website) that is named as "Contributors" with an associated Custom Taxonomy. Contributors have Patrons, Trustees, Foundation Friends, Consultant Advisors, etc as child categories and taxonomies.
50 + Contributor posts have been created under the various subcategories and assigned the relevant sub taxonomy and the page template has been set to Side Navigation under the Avada Theme Framework.
I have created content templates for the single post items and created the same or the desired archive pages for each subcategory using Views. So I now have 50+ CPT posts and 5 CPT archive pages
all set to side navigation
to keep the section navigation contextual to that section.
Now comes my problem. I need to have an expandable/collapsible sidebar navigation menu that is contained to within the Contributors categories that displays at the top of the sidebar allowing for other content widgets to display underneath it.
I've done the research and tried the plugins; I've put in custom CSS and JS in the Avada child theme, but, to be honest not gone the route of dumping tons of experimental code into functions.php.
I just need to navigate efficiently within the Contributor's section without having to use the native WP Custom Menu which displays everything as expanded. Is there a way to do this with Views? Or anything?
The issue is fundamental to the continued development of the site. If we can get this right, the rest falls into place and ones' sleep might become somewhat more restful. I'd appreciate any help or advice that you may be able to provide.
Thanks
PeterG
Dear PeterG,
I suggest you try with the Nested View + JqueryUI Accordion.
1) Create a nested view,
a) parent view list top terms of Custom Taxonomy "Contributors"
b) Child view list posts of term from parent view.
More help:
Views Inside Views – Display Nested Multidimensional Lists
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/
2) use JqueryUI Accordion to do the Expandable/ Collapsible
hidden link
3) put the parent view into your widget.
Spent a day messing about with your suggestion without much luck. I could only get Contributors to display the child archive pages (Patrons, Trustees, etc.) as links. Rather than being able to have a sidebar menu structure that looks like:
Our Contributors
> Foundation Patrons (CPT Archive page - in a collapsible accordion)
> Single Patron 1 (Title with Link)
> Single Patron 2 (Title with Link)
> Single Patron 3 (Title with Link)
> Foundation Trustees (CPT Archive page - in a collapsible accordion)
> Single Trustee 1 (Title with Link)
> Single Trustee 2 (Title with Link)
> Single Trustee 3 (Title with Link)
Of course, just using the native WP sidebar navigation, this is achieved, but it's all expanded. So I'm just using a third party auto CPT menu plugin at the moment.
Ah well ... perhaps a flash of brilliance will present itself in due course.
Since it needs custom codes, could you duplicate same problem in a test site, and fill below private detail box with login details and ftp access, also point out the problem page URL and View URL, I can try setup a demo for you