0

In my template I have registered several sidebars with function register_sidebar().

Now I am looking for a way how to get list of all registered sidebars in Gutenberg. I was looking in documentation here: https://developer.wordpress.org/block-editor/data/ but didn't find anything useful.

Is it even possible to get such a data in Gutenberg?

1

This data is not passed into Gutenberg by default. You should create custom REST API endpoint and data store. This article might help with some code examples.

| improve this answer | |
0

I will recommend you to create custom shortcode in the WordPress to getting registered/custom sidebar, so that you can display this sidebar anywhere over the website using shortcode.

| improve this answer | |

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.