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


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 jquery Nov 26 '17 at 21:49
  • What are you talking about? Did you read my answer? Nov 26 '17 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 learn Nov 28 '17 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 unless Nov 28 '17 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 attention Nov 28 '17 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.