1

I want to hook into the editor.PostTaxonomyType filter and instead of HierarchicalTermSelector call my extended version that will render SelectControl instead of checkboxes.

I found an old StackExchange thread doing what I wanted to do, but at that times HierarchicalTermSelector was a class, not a function. Is it still possible to extend the function in React rewriting just a part of it? My knowledge of React is a bit limited, but I guess the only way to get out of it is to copy the whole function and change it?

Thanks a lot!

1
  • 1
    Helgatheviking has a plugin that does this and has asked questions on this topic on the site previously. Note that you don't need to take this approach, you can remove the panel with the UI and add your own panel with a SelectControl instead, or have both! Or neither. Rewriting the component is not the solution here and would be the most difficult approach to take, requiring very advanced React skills and likely a custom build of the editor assets, it would require extreme effort that is totally unnecessary
    – Tom J Nowell
    Commented Mar 18, 2022 at 14:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.