Title: How to have a PluginDocumentSettingPanel initially opened?
Last modified: September 18, 2019

---

# How to have a PluginDocumentSettingPanel initially opened?

 *  Resolved [Benny](https://wordpress.org/support/users/bvl/)
 * (@bvl)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/how-to-have-a-plugindocumentsettingpanel-initially-opened/)
 * I have added a PluginDocumentSettingPanel plugin to my WP plugin.
    Is there a
   way to have the panel initially opened?
 *     ```
       const { registerPlugin } = wp.plugins;
       const { PluginDocumentSettingPanel } = wp.editPost;
   
       const MyDocumentSettingTest = () => (
               <PluginDocumentSettingPanel className="my-document-setting-plugin" title="My Panel">
               <p>My Document Setting Panel</p>
           </PluginDocumentSettingPanel>
       );
   
        registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );
       ```
   
 * The PluginPostPublishPanel has a property initialOpen that can be set to true
   but that isn’t available/working for PluginDocumentSettingPanel.
 * Is there still a way to achieve the same for a PluginPostPublishPanel plugin?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jorge Costa](https://wordpress.org/support/users/jorgefilipecosta/)
 * (@jorgefilipecosta)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/how-to-have-a-plugindocumentsettingpanel-initially-opened/#post-12146737)
 * Hi [@benny](https://wordpress.org/support/users/benny/),
 * You may programmatically open the panel by using:
    wp.data.dispatch( ‘core/edit-
   post’ ).toggleEditorPanelOpened( panelName ). The block editor persists what 
   panels the user opened and closed, so ideally that code should only be executed
   one time. I guess one way to accomplish this is checking that wp.data.selelect.
   getPreference( ‘panels’ )[ panelName ] is undefined before executing the action.
 * I hope you find my answer useful, feel free to comment if you need additional
   clarification.

Viewing 1 replies (of 1 total)

The topic ‘How to have a PluginDocumentSettingPanel initially opened?’ is closed
to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Jorge Costa](https://wordpress.org/support/users/jorgefilipecosta/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/how-to-have-a-plugindocumentsettingpanel-initially-opened/#post-12146737)
 * Status: resolved