Closed ckristhoff closed 6 years ago
I am not 100% sure I understand your issue, but if I do than you need to add the corresponding JS to your settings section ( postbox.js - you will find it in the admin/js folder or just use wp_enqueue_script('postbox');
) .
Other option is write your own to make things short .
As far as I remember , it is indeed not included in the plugin.
I have a small javascript inside an other plugin to close/open meta boxes. maybe this helps you. https://github.com/bueltge/adminimize/blob/e27044bf79cf48fd20ec966a011224d8a50b811f/js/adminimize.js#L25-L32
I add, remove only the default css classes from the WP Core to hide, show the areas.
Just as @x9t9 said:
wp_enqueue_script('postbox');
but, you must add next script:
jQuery(document).ready(function(){ postboxes.add_postbox_toggles(pagenow); });
voila!
@ckristhoff I close this issue because in my opinion the question is clarified. If I'm wrong, please feel free to reopen it.
Hi First, awesome project! I'm developing my first plugin for Wordpress 4.9 and this project is really useful. I'm trying to use meta boxes for settings sections but it does not collapse.