How to set page attributes programmatically in Gutenberg?
-
Trying to set the page template and parent page on load (for new pages)
Normally I would do this with jQuery, set the select value and trigger change.
But the ComboBoxControl won’t change or accept the new values.Any idea how to pre-select those two values or trigger the changes for the select boxes?
$('.editor-page-attributes__template select').val("my-template.php").trigger('change'); $('.editor-page-attributes__parent input').focus().val("Parent Page Name");
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to set page attributes programmatically in Gutenberg?’ is closed to new replies.