• 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)
  • same question, but I wonder what the future holds for WP because the development process feels so disjointed and the number of problems means they will always be playing catch-up and developers will leave it behind for something more polished. What you have been posting is very valuable, but I find it odd that a setup as large as WP could not get this right, and developers have to rely on 3rd parties like dedicated hosting ip to gain knowledge instead of the useless official documentation.

    I was originally in Gutenberg’s corner, but over the past couple of months and working with it on live builds we see it is slowing down the development process massively. Plus, feedback from clients has not been great either. The next year feels like it could be a make or break in terms of using it and investing more development time into it.

Viewing 1 replies (of 1 total)
  • The topic ‘How to set page attributes programmatically in Gutenberg?’ is closed to new replies.