Load plugin files only when needed
-
I have been looking for an accordion menu solution for a custom post type archive with a lot of terms, and really like the way your plugin functions, esp since I can choose to use a pre-existing menu OR generate one from a taxonomy/category
But, when testing out the plugin I saw that the menu’s css/javascript are loaded on every page of the site. Can the plugin be updated such that the included scripts are only loaded when the shortcode is present?
Also, although I like the included style, it would be nice if there was a minimal style option available that more respected the active theme… something like:
.wpb_category_n_menu_accordion ul li > a > span.wpb-submenu-indicator { float: right; font-weight: bolder; -o-transition: transform .3s linear; -moz-transition: transform .3s linear; -webkit-transition: transform .3s linear; -ms-transition: transform .3s linear; } .wpb_category_n_menu_accordion li.wpb-submenu-indicator-minus > a > span.wpb-submenu-indicator { -ms-transform: rotate(45deg); -moz-transform: rotate(45deg); -webkit-transform: rotate(45deg); transform: rotate(45deg); } /* Cat Count */ .wpb_category_n_menu_accordion ul li .wpb-wmca-cat-count:before { content:" ("; } .wpb_category_n_menu_accordion ul li .wpb-wmca-cat-count:after { content:")"; }
The topic ‘Load plugin files only when needed’ is closed to new replies.