Accordion Sidebar Menu

Shows all the children under the current root item and all other root items.

This is the code for an accordion based on the portfolio_item post type (php):

and the css:

If we want to create an horizontal menu instead:

Then style it including current distinctions and going to vertical accordion at 768px (first the css):

and the jquery: