Support » Theme: Twenty Twenty » one error which prevents me from updating file even if I check the box to update

  • Resolved flamingnova3719

    (@flamingnova3719)


    I am having trouble updating the style.css file for the theme through wordpress. It has one error (that I cannot find) that prevents me from updating it even if I check the box to update it anyway. I have had no such problem when troubleshooting mode switches me to twenty nineteen theme and I have had no issue with any other theme. Any help would be much appreciated. I have not changed any code in the style.css file.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Would you please quote the error you’re seeing?

    @macmanx I haven’t been able to find the error in the file (any red X) but this is what it says before I can try to update: There is 1 error which must be fixed before you can update this file. Update anyway, even though it might break your site?. And then after trying to update: Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over http://FTP.if that helps explain the situation.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What file are you trying to edit, and what code are you adding?

    Please use the “CODE” button above the reply field here, and if the code is longer than 5 lines, please use Pastebin or a Gist to share it.

    @macmanx I am trying to edit the style.css and I have not added any code before the error pops up though code I have tried to add in the past is

    h1.entry-title, h2.entry-title {
        margin: 0;
        color:#19440E
    }

    at line 2436 and just the color part

    a colon ; is missing.

    
    h1.entry-title, h2.entry-title {
      margin: 0;
      color:#19440E;
    }
    

    I would also not recommend to edit the style.css of the theme directly but to use the costumizer option instead.
    Go to “Theme” > “Customizer” > “Additional CSS” and paste your code there.

    Editing the theme files directly (like you are doing with the style.css) will overwrite all your changes with each update of the theme.

    If you intend to make changes to the code base of the theme, follow the codex and use child themes.
    https://developer.wordpress.org/themes/advanced-topics/child-themes/

    • This reply was modified 3 months, 2 weeks ago by raQai.
    • This reply was modified 3 months, 2 weeks ago by raQai.

    @raqai I added the ; and it still shows that there is one error with the file. I know the risks of making direct changes to the style sheet but as I don’t have an FTP account with my host (as someone else actually manages our website through the host) I believe this will be the best way going forward and I do have a backup of the original code just in case I do end up breaking things.
    Edit: Maybe the additional CSS option is the best course to go because it allows for a lot more customization than I thought.

    What happens when you try putting the code in the “Theme” > “Customizer” > “Additional CSS”? This is the safest way of modifying WP styles.

    @stilman-davis I was able to successfully change the elements I wanted to and publish the changes without error.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.