theme.json styles rendering on backend but not frontend
-
I’m a first timer learning to build my own block theme, following this tutorial.
I can’t for the life of me figure out why global styles are rendering on the front end but not the back end. I’ve basically done what the tutorial says word for word.
I also compared a a few different templates like this one.
I’m using Local as a local development environment, but tried putting it on a live server to see if it made any difference and it didn’t.
I’m assuming it’s something wrong with my functions.php file as there isn’t much happening anywhere else.
if ( ! function_exists( 'dianella_theme_support' ) ) : function dianella_theme_support() { add_theme_support( 'wp-block-styles' ); add_theme_support( 'editor-styles' ); add_theme_support( 'post-thumbnails' ); add_editor_style( 'style.css' ); } add_action( 'after_setup_theme', 'dianella_theme_support' ); endif; function dianella_theme_styles() { wp_enqueue_style( 'dianella-theme-style', get_stylesheet_uri() ); wp_enqueue_style( 'dianella-theme-style' ); } add_action( 'wp_enqueue_scripts', 'dianella_theme_styles' );
Aside from that I’ve just added some fonts…
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘theme.json styles rendering on backend but not frontend’ is closed to new replies.