• Resolved piterkaillada

    (@thebea58)


    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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    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

    (@thebea58)

    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.