I am creating a new template and I see that the additional css of the twentyseventeen template is rendered without updating the page instead the additional css of my theme are seen changes after updating the browser window
1 Answer
Additional CSS in the customiser is core WordPress functionality and shouldn't behave differently between themes. You can see in /wp-includes/js/customize-preview.js that the preview is simply JavaScript that simply sets the content of the <style id="wp-custom-css"></style> element to the content of the Custom CSS text field. The <style> element itself is added by the wp_custom_css_cb() function hooked into wp_head at priority 101. So as long as you have the wp_head() function in your theme, it should behave exactly the same way.
-
thanks you I have already learned how to render with jqueryRuben Cortez– Ruben Cortez2017-11-26 21:49:38 +00:00Commented Nov 26, 2017 at 21:49
-
What are you talking about? Did you read my answer?Jacob Peattie– Jacob Peattie2017-11-26 23:03:39 +00:00Commented Nov 26, 2017 at 23:03
-
The error is in my question I did not know how to formulate it I tell you I was learning to create themes for wordpress and I saw that the customizer existed something special and that it looked like something advanced so I called myself too much attention and decided to learnRuben Cortez– Ruben Cortez2017-11-28 04:09:04 +00:00Commented Nov 28, 2017 at 4:09
-
to do for my themes what I was ahy and that's when I saw that I could add_setting or add_section or add_control but when adding a color or something the changes were not reflected unlessRuben Cortez– Ruben Cortez2017-11-28 04:09:52 +00:00Commented Nov 28, 2017 at 4:09
-
I updated the browser or changed from postmessage to refresh then I learned that the js is responsible for rendering with jquery and ready what I did not know what I learned thanks for your attentionRuben Cortez– Ruben Cortez2017-11-28 04:10:11 +00:00Commented Nov 28, 2017 at 4:10