Back to Menu Lists Support

tsaunders836827
tsaunders836827

Hey,

Is there a way to add a class of 'parent-active' to parent that has an active child?

I've currently hacked it a little bit so I can have comma separated values in the parent 'Selected Item Id', then I'm doing the following in the Menuitem.php on line 106:


if ( !empty($settings['selected_item']) && in_array($settings['selected_item'], explode(',', $this->selected_item_id)) )

This results in both parent and child having a class of active, which works fine for me.

Just wondering if there's a way to include it in the plugin without using CSV in the parent name and hacking the plugin.

Last updated

Flynsarmy
Flynsarmy

This is not supported at the moment. The plugin is open source though. If you have a nice way of handling it, feel free to send a PR.

1-2 of 2