hello @oscarguy
It is not stored in files ,It’s stored in the database, within the wp_posts table, under the custom_css post type, where the post name is the theme slug. There you also have the related customize_changeset and revision post types.
The custom css post ID is also stored in the wp_options table under each theme mods, e.g. theme_mods_twentysixteen for Twenty Sixteen.
It’s informative to check out how the custom CSS fetched from the database with:
wp_get_custom_css() that uses wp_get_custom_css_post()
and displayed through the wp_head action with:
wp_custom_css_cb()
Thanks.
there’s an error saving. I assume it’s because it’s too big
It’s probably not a good idea to paste long CSS to the Customizer’s Additional CSS option but I don’t see why it would cause any errors. Are there any error messages?
If you really need to paste huge chucks of CSS then it would be better if you used a child theme you can add your codes on the child theme’s style.css file.
-
This reply was modified 4 years, 11 months ago by ronangelo.
I have tried making a child theme, but something in the code I pulled from the wordpress.org site isn’t working and since I don’t know how to code php, I have no idea what’s wrong.
PHP? Only CSS can be added to the Additional CSS option. What are you trying to accomplish? Could you link the page where you got the codes from?
I was referring to the child theme. I haven’t put PHP in the Additional CSS section.