I've created a wordpress headless installation that rely on vuejs and REST api for the front-end. I need to add into the classic editor a datepicker to give the user the ability to select a date that needs to be part of response of the REST api. Is there any hook to use to achive this?

  • There are many hooks in the classic editor, but you will need to be more specific about how/where you're going to add the date picker. Have you looked at the metabox api? Note that this is much easier in the block editor, as there's a standard date picker component in core. Register the post meta in PHP (which you should be doing even if you use the classic editor, especially since you're using the REST API), then add a panel with a button, open the datepicker when the button is clicked, change the post meta when the datepicker changes – Tom J Nowell Mar 24 at 13:46

Your Answer

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

Browse other questions tagged or ask your own question.