admin管理员组文章数量:1406920
I've been using a block theme for some time but recently (not sure when), all the additional CSS I had stored disappeared. I'm not sure how to retrieve that data and I'm hoping someone here can point me in the right direction. I'm afraid that whatever deleted that option in the left-hand menu of the admin panel also deleted the additional css I had set for the site.
Is there a resource on the internet (such as the Wayback Machine) that might have preserved that CSS data? I wrote some of that years ago and I cannot remember how I laid out a few things. I've restored some of the lost data from a very old version of my CSS but that was before I made some more recent changes.
I've been using a block theme for some time but recently (not sure when), all the additional CSS I had stored disappeared. I'm not sure how to retrieve that data and I'm hoping someone here can point me in the right direction. I'm afraid that whatever deleted that option in the left-hand menu of the admin panel also deleted the additional css I had set for the site.
Is there a resource on the internet (such as the Wayback Machine) that might have preserved that CSS data? I wrote some of that years ago and I cannot remember how I laid out a few things. I've restored some of the lost data from a very old version of my CSS but that was before I made some more recent changes.
Share Improve this question edited Mar 24 at 0:27 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Mar 23 at 22:47 OscarGuyOscarGuy 351 silver badge9 bronze badges1 Answer
Reset to default 1In classic themes, the “Additional CSS” from the Customizer is stored in the database under: wp_options → theme_mods_{your-theme-name} or wp_global_styles
, sometimes in a key called custom_css
.
Block themes often hide or completely remove the Customizer from the menu, which can make it appear as though your CSS is missing — even though it may still exist in the database.
To check, you can run:
SELECT * FROM wp_posts WHERE post_type = 'custom_css';
or
SELECT * FROM wp_posts WHERE post_type = 'wp_global_styles';
In some cases, the css is stored by postmeta:
SELECT * FROM wp_postmeta WHERE meta_key LIKE '%css%';
Please note: if your WordPress installation uses a different table prefix than wp_, you'll need to update the table names accordingly. For example:
wp_posts
tokhuw7i_posts
wp_postmeta
tokhuw7i_postmeta
Good luck!
本文标签: Custom CSS Has Disappeared
版权声明:本文标题:Custom CSS Has Disappeared 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744344866a2601697.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论