You could change the file version each time the file gets updated. To do this, go to your functions.php file and find where the style-sheet is being enqueued (or registered) – it will look something like:
wp_enqueue_style( 'theme-style', get_template_directory_uri() . '/style.css' );
and change it to:
wp_enqueue_style( 'theme-style', get_template_directory_uri() . '/style.css', array(), filemtime( get_template_directory_uri() . '/style.css' ) );
This will change the file version each time you save it, forcing the new version to get loaded.
As you very correctly pointed out, the styles have to be properly added in functions.php, not hard-coded in header.php or elsewhere.
Related Posts:
- WP 3.4 – what action/hook is called when theme customisation is saved?
- Is it good to rename theme folder downloaded from WordPress.org?
- Editing the custom background CSS
- What, specifically, should be included in theme_name_setup()?
- How to get gallery images?
- Is the theme customizer slowing down my site?
- How can I get wp_head() as a string instead of echoing it?
- What does “Do not deregister the jquery script in the administration area” mean?
- What is the best book to learn how to make themes for wordpress?
- Symlink a directory to wp-content/themes
- What are WooCommerce starter themes? [closed]
- How to disable the gradient and font size internal CSS added by WordPress when using theme.json
- Is there an error in get_the_tag_list()?
- Example of a theme organization without all the default wp files in root
- Disable the Custom Internal CSS added by theme.json for Certain Pages
- Unwanted blank lines before tag
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- How do you protect a premium theme from being copied?
- Custom Nav Walker Displaying Values in Sub Menu
- How to configure wordpress to work with Vuejs with SSR and without hashbang
- How can one update a theme on a live site without interruption?
- Sub folder CSS that’s read by Admin panel
- Some doubts about how to show posts in a custom theme?
- Dequeue a style file which is making website load slow!
- Can’t delete theme
- How to add a second stylesheet to the editor
- Single Page theme [closed]
- Can I have two different theme for two different language?
- WP_Comment_Query – Get comments and answers separately
- excerpt() shows different result between remote and localhost(development environment)
- Prefix best practice, should we use framework name or theme name?
- Theme Javascript.php Overwritten Nightly [closed]
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- Admin: sub menu doesnt display under apperance when activate my themes
- Overrite parent functions using child functions
- Does code in function.php differ from theme to theme
- How can I change the theme of different posts using a plugin?
- Create a child theme from multiple themes
- Theme not showing up
- Change image size depending on page
- Are seven additional image sizes are too many?
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- registering a global template wordpress 6.0
- Copying the theme style files and images to duplicate the website but with a difference
- I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
- get_header action not working
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- How add built-in textarea in theme development?
- Remove h1 from 2015 theme
- WordPress pulling in random page themes
- Some doubts about WordPress handle the horizontal main menu visualization
- Filter didn’t work on content class (hybrid_post_attributes)
- Can’t change theme name
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- How to make a function occurs for one time?
- How do I restructure the comment HTML layout?
- Trying to link to a php template file but its blank
- Custom Enfold theme tab layout not compatible with WPML
- Theme: dropdown hover menu not showing up in IE/Edge
- Problem with pagination link (error 404)
- how to ensure responsiveness in wp themes? [closed]
- How to test another theme in a live WordPress website instead of live preview?
- home is not working in wordpreess
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Local theme changes upload on server but theme changes not showing
- WordPress Custom font not found
- WordPress uploads do not show up and I see the white screen of death in some cases
- Can’t upload images on new theme
- Any way to permanently translate themes?
- New created Theme leads to malfunctioning Xampp Apache –> functions.php is cause
- WordPress Blog Page displaying nothing
- Primary Menu Showing All Pages With No Sub-Nav
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- Safe way to echo wp_trim_words
- Theme Development : License help
- How can I demonstrate themes well?
- Why the slideshow is not shown in my theme?
- How to update my own theme?
- WordPress custom jquery not found
- Displaying Tags for the Page I’m On?
- Custom link color or stylesheets
- How to make navigation a list without a plugin? [duplicate]
- Showcase your wordpress themes [closed]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- How to remove proudly created by WordPress in theme?
- Roll my own theme or customize an existing one [closed]
- Why do some sites show themes/”themename” as the only theme?
- How do I add new layout width options in WordPress editor?
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- Dynamic nav menu with icons [closed]
- TItle In Latest Post is not using H1 Tag [closed]
- Is via.placeholder.com a good site to auto-generate placeholder images?
- Should we escape the values of constants?
- How to Add Dynamic Sliders to WordPress Customizer with JavaScript
- Trying to create a cutom query with pagination and page 2 breaking. Any help?
- Why is wp_nav_menu() not removing the container around the nav ?
- Full Site Editing, Block Theme, Gutenberg, Site Editor