registerPlugin for Site Editor + useSelect for wp_navigation wp_template_part post types #59393
Replies: 2 comments
-
Update, found out the answer for first question - there are different imports for block and site editor:
Still need help with postMeta |
Beta Was this translation helpful? Give feedback.
-
Update: I ended up with custom REST API endpoint which returns custom data from wp_postmeta table for wp_navigation and wp_template_part post types Please advice if there are other recommended ways to obtain postMeta for above mentioned post types. |
Beta Was this translation helpful? Give feedback.
-
Hi there, probably a dumb question here, I think I am missing something.
Is there out of the box logic which will make registerPlugin work in sidebar inside the Site Editor?
I cant get any element rendering there, tried PluginSidebarMoreMenuItem, PluginSidebar, PluginDocumentSettingPanel
They are properly working in regular Block Editor though.
Also, besides rendering, I would like to use useSelect, useDispatch to get and update post meta of wp_navigation and wp_template_part post_types, but Im getting undefined. What is the recommended way to access that data?
I tried
import { useDispatch, useSelect } from '@wordpress/data';
Beta Was this translation helpful? Give feedback.
All reactions