Enqueue core block’s CSS with custom dynamic block
-
We’ve created a custom, dynamic block, that pulls data dynamically with PHP from an external database.
For the front end styling, I would like to use WordPress’s columns and column blocks to arrange the content. It’s easy enough to apply the columns block structure to the HTML mark up. The styling is not as easy, though, since WordPress will only load those when the actual columns block is used.
How can I enqueue WordPress’ core styles for the columns/column blocks when my dynamic, custom block is used?
Obviously I could write some CSS to do the same formatting, but I would rather not re-invent the wheel in making new columns CSS.
Is there a way to enqueue a core block’s CSS, even when it’s not used on the page?
The topic ‘Enqueue core block’s CSS with custom dynamic block’ is closed to new replies.