3

I'm adding a new panel to a Gutenberg block through the editor.BlockEdit wp.block filter.

<InspectorControls>
   <PanelBody title={ __( 'New Settings' ) } initialOpen={ false } >
   ...
   </PanelBody>
</InspectorControls>

The new panel appears on top of the default panels. Is there any way to change the order? To make it show below other panels? I did not find any documentation about this..

-2
    <InspectorControls>

       <PanelBody title={ __( 'Settings One' ) }>
       </PanelBody>

       <PanelBody title={ __( 'Settings Two' ) }>
       </PanelBody>

       <PanelBody title={ __( 'Settings Three' ) >
       </PanelBody>

    </InspectorControls>

If you insert multiple Panelbody like I did in above code. You will have multiple inspector controls with first one being ope by default. Change the panelbody accordingly to match your desired order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.