Where are Additional CSS files stored

Wordpress Additional CSS

This image shows the Additional CSS feature in WordPress. I’m trying to find the file that stores the additional CSS, but can’t seem to find it anywhere – I’ve searched almost every folder in wp-content!

Does anyone know how Additional CSS for the theme is stored and, if it is in a file, where this file is located!

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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:

and displayed through the wp_head action with:

Method 2

type this into the sql query if your new like me, and it should come up.

SELECT * FROM wp_posts WHERE post_type = ‘custom_css’


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x