$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>WordPress code editor VS customizer "built-in CSS editor"?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

WordPress code editor VS customizer "built-in CSS editor"?

matteradmin8PV0评论

I needed to make some CSS changes to my WordPress site (child theme) earlier and opened the WordPress editor inside "Appearance":

Appearance > Editor > someCssFile.css

Inside the editor page, there's a notice on top of the page that says:

Did you know?

There’s no need to change your CSS here — you can edit and live preview CSS changes in the built-in CSS editor.


Other than the live preview feature, are there any other kind of differences (performance or otherwise) between the customizer "built-in CSS editor" and the WordPress code editor that is available in Appearance?

I needed to make some CSS changes to my WordPress site (child theme) earlier and opened the WordPress editor inside "Appearance":

Appearance > Editor > someCssFile.css

Inside the editor page, there's a notice on top of the page that says:

Did you know?

There’s no need to change your CSS here — you can edit and live preview CSS changes in the built-in CSS editor.


Other than the live preview feature, are there any other kind of differences (performance or otherwise) between the customizer "built-in CSS editor" and the WordPress code editor that is available in Appearance?

Share Improve this question edited Jan 23, 2019 at 18:54 AndrewL64 asked Jan 23, 2019 at 18:23 AndrewL64AndrewL64 2034 silver badges18 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

Here is a warning that also displays when you go into Appearance > Editor. This message appears regardless of using a child theme or not (at least in WP 5.0 +)

You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme’s CSS, you might want to try making a child theme.

If you decide to go ahead with direct edits anyway, use a file manager to create a copy with a new name and hang on to the original. That way, you can re-enable a functional version if something goes wrong.

The only difference in performance, (which in cases of adding a little CSS is less than minimal) that I can think of is when using Appearance > Editor you are actually editing a real CSS file, so your styles will get added directly into that file. When you use Appearance > Customize > Additional CSS the orginal stylesheet isn't effected. It creates a style tag within the head section with your styles in it.

Since you already have a child theme, I would say that editing the CSS file directly is the way to go (Appearance > Editor). There is no need to add extra styles to the head section. Plus it will keep all of your styles in 1 spot making it easier to manage.

Post a comment

comment list (0)

  1. No comments so far