Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with blockbase #7

Open
miguelalanis opened this issue May 18, 2022 · 3 comments
Open

Does not work with blockbase #7

miguelalanis opened this issue May 18, 2022 · 3 comments

Comments

@miguelalanis
Copy link

The code does not work with the Blockbase theme. I have tested with the Genesis, Twenty Twenty-One and Blocksy themes and it works. But with Blockbase it does not load the styles in the front-end.

Expected
That the blockbase thema loads the block styles in the front-end.

Observed
When installing this code as a plugin it loads the block styles only in the WordPress editor.

@audunmb
Copy link

audunmb commented Aug 24, 2022

I have the same issue in Twenty-Twenty-Two and Jace (also a FSE theme).

@audunmb
Copy link

audunmb commented Nov 29, 2022

add the following to the code

if ( wp_is_block_theme() ) { wp_enqueue_style( 'block-styles-stylesheet' ); }
to fix this. It's a bug that affects all FSE themes.

@audunmb
Copy link

audunmb commented May 4, 2023

I made a branch of this that registers styles with JavaScript instead, it works in newer versions of Wordpress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants