• I made some changes to my CSS file of my theme and it’s just not updating. It stays ver 4.2.2 even though 4.2.3 is the new one. If I put the CSS file into the header.php manually from anothe server it works like it should. But if I link the actual file on the same server it does not work.

    Even after 3 hours of waiting and switching from windows 8.1 to 10 does nothing.

    How can I force wordpress to update the file?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Sorry, I’m kinda confused on what you’re doing.

    Are you just trying to change some CSS in the style.css file under the appearance > editor section?

    Thread Starter szoszk

    (@szoszk)

    Yes the style.css but via ftp

    Is this a theme that you’ve created? Can you please provide a link to your site so we can examine it?

    Thread Starter szoszk

    (@szoszk)

    Yes it’s my own theme.
    https://smart04.pro-linuxpl.com/e-magazyn/
    If you want I can give you admin for the dashboard because I’m just developing a theme on this wordpress site

    In your functions.php file, you are enqueing the stylesheet like this?

    wp_enqueue_style( 'e-magazine-style', get_template_directory_uri() . '/style.css', array(), '4.2.3', 'all' );

    Thread Starter szoszk

    (@szoszk)

    No just like this:
    wp_enqueue_style( 'e-magazine-style', get_stylesheet_uri() );

    If I put the CSS file into the header.php manually from another server it works like it should.

    So when you add the link to the CSS file in header.php, do you add this line:

    <link rel='stylesheet' id='e-magazine-style-css' href='https://smart04.pro-linuxpl.com/e-magazyn/wp-content/themes/e-magazine/style.css?ver=4.2.3' type='text/css' media='all' />

    Or do you call wp_enqueue_style()?

    I think the version number, when you call wp_enqueue_style(), is going to default to 4.2.2 because that refers to the WordPress version. If you want to change it to some other number, you can add it as the fifth parameter as in my earlier post above.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘CSS File not updating’ is closed to new replies.