Hi,
I thought it would be simple, but I’m surprisingly having a hard time finding the relevant documentation…
I have a custom post type called “cta-tile” which is basically a box with a button in it and some text. I’d like to edit the visual post editor so we can preview the appearance from within the editor. All I’d need is to be able to wrap the whole section containing the blocks (e.g., the <div class=” editor-styles-wrapper”>) into another <div> that I could style by using fields defined in ACF. How do I wrap the blocks in that way ?
I’ve tried using `add_filter( ‘render_block’, ‘wrap_cta_tile_blocks’, 10, 2 );` but it doesn’t change the post editor ; I’m assuming it changes only the front end.
I’ve also tried playing around with the template files in themes/mytheme/page-templates, but either there’s something I don’t understand or this is not the right way to do this either… I was able to get to have a choice in the “Template” option, called CTA Tile, on the editor’s right-hand toolbar, but selecting that template still doesn’t seem to change anything within the editor…
I’m sure there’s documentation on this somewhere, I guess I’m just not asking the right question ? I’ve even asked ChatGPT and all it gives me are the two above solutions…
Thanks for your help !
[ad_2]