Title: Editing widget css file
Last modified: February 9, 2018

---

# Editing widget css file

 *  Resolved [piterkaillada](https://wordpress.org/support/users/thebea58/)
 * (@thebea58)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/editing-widget-css-file/)
 * Hi there and thanks for your plugin!
 * I’m a newbie, so sorry in advance if my question is too simple.
 * I am editing a widget style through its css file. I want to keep the changes 
   safe and active. I tried copying the file content to a new snippet; it didn’t
   work. I got this message:
    The code snippet you are trying to save produced a
   fatal error on line 3: syntax error, unexpected ‘{‘
 * What process should I follow?
 * Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fediting-widget-css-file%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/editing-widget-css-file/#post-9959012)
 * Hey,
 * At the moment, Code Snippets doesn’t support pure CSS code, so you’ll need to
   wrap it in some PHP code in order to get it to work.
 * Here’s an example to add CSS code to the front-end of your site:
 *     ```
       add_action( 'wp_head', function () { ?>
       <style>
   
       /* CSS code goes here */
   
       </style>
       <?php } );
       ```
   
 *  Thread Starter [piterkaillada](https://wordpress.org/support/users/thebea58/)
 * (@thebea58)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/editing-widget-css-file/#post-9971714)
 * Hi and thank you so much for your answer!
 * It allowed me to save and activate the snippet perfectly. I guess I will only
   see if the changes stay once the plugin is updated.
 * In any case, your plugin and help are much appreciated 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Editing widget css file’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [piterkaillada](https://wordpress.org/support/users/thebea58/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/editing-widget-css-file/#post-9971714)
 * Status: resolved