Try changing the version number on .css and .js files when you change them. That can be a real pain while you are developing so you can use a random number.
$randomizr = $rand = rand( 1, 99999999999 );// Enqueue scripts and styles
wp_enqueue_script( 'my-script', get_stylesheet_directory_uri() . '/assets/js/my-script.js', array('jquery'), $randomizr, true );
Related Posts:
- WordPress theme Modifications not showing up on live server
- Getting failure when using filemtime() with wp_enqueue_style
- Caching and Versioning for rtl.css
- How wp_cache is supposed to work, and does it help with performance?
- Is it feasible to build and update a WordPress website offline?
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- Cache Busting using htaccess Rewrite rule?
- Root Sage theme styles are not working!
- How to make a local cache of mshots images
- Installing WordPress locally
- How to first edit in local WordPress editor on page and the add code?
- Should i clear the plugin cache for cache busting?
- Take control of WordPress before functions.php
- My wordpress theme name isn’t updating straight away
- Testing localhost WordPress site over LAN with iPad, iPhone
- Activating theme in local MAMP installation results in HTTP ERROR 500
- Saving Permalinks Results in 403 MAMP (Windows)
- Form to Add Posts to Custom Post Type
- How do I add settings to the Background Options Page?
- Import media to online WordPress from local development
- How to add a checkbox element to attachments editor with example
- What is the right way to include a wp-admin file in your theme?
- Theme Check gives: Required: This theme doesn’t seem to display tags?
- Is it possible to use line break in theme description?
- Override Current Theme Setting in wp_config.php
- Theme showing incorrect update
- modify a output of a widget
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- changing Specific section background image in wordpress
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- Which is the simplest theme for WordPress to use it as your base?
- How to highlight the current page in the nav menu?
- Should I use language_attributes() or bloginfo(“language”) in html tag
- Getting jquery to work with custom theme
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Why does WP recommend against custom favicon functionality in themes?
- What’s the best action to use when you want to do something only once per theme setup?
- Excluding a page with a certain name from wp_page_menu
- Widgets with groups / sub widgets? Widget in a widget?
- How to upload images using Settings API
- Avada resources still loading from localhost after database migration [closed]
- How do I create a custom partial / template?
- Get a setting value conditionally in the Customizer api
- How should I be handling my theme version numbering?
- How would you accomplish the following advanced settings page?
- image url relative path not working in css file
- Sort wp_query by sum of two meta fields
- How to i style the elements from the TinyMCE
- Integrate WooCommerce theme with a WordPress theme [closed]
- Automated Footer information
- Change the “Default Avatar” admin option via functions.php
- How to develop a menu like wwe.com?
- How to escape multiple attribute at once in WordPress?
- Override plugin option by with a custom theme
- Is WordPress a good option for this…?
- Review site using WordPress
- How to create query to get top 3 sticky/latest posts
- Fatal error: Class ‘ZipArchive’ not found
- What happens if a theme is no longer supported?
- Running a function on post update with new post meta
- Check if( selected() )
- Modify available templates (in dropdown)
- Is There A WordPress Hook for Accessing Attachments for A Particular Page?
- WP Customazation API doesn’t save the default Value
- Change WordPress Resource URL
- Sample Theme Options page for Multisite – what to consider
- How to use shortcode inside of shortcode in theme
- Search Form Not Working
- My contact form – I’ve changed the source code but the changes are not being applied
- Theme calling page.php instead of home.php
- Open portfolio image in light box
- Why do sticky posts show in this menu?
- Dot “.” in option value foobars save options function
- style variations hurt the editing performance
- Strict Folder and File Permissions for WordPress Themes Folder
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- How to properly use AWS SES for a contact form?
- No templates for condition page.php Elementor
- How can I set multi archive page template on same time for only one custom post type?
- Exclude categories from wp query not working
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- How to get custom logo with REST API instead of get_theme_mod();
- How can I change this SVG shape that’s generated?
- Can I set rest API endpoints from within a theme?
- Theme starter content translation is not working
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- remove_action(‘genesis_header’,’genesis_do_header’) hook not working
- Customizer Image-Picker Preview Not Working
- Mobile view logo background colour in wordpress
- Breaking Categories Up into Individual Divs
- Strip HTML tags on custom code from the_content
- wpdb->insert adds too many rows
- wpalchemy repeating fields dropdown issue
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- WordPress loop not working on blog.php page
- Option to show/hide widget depending on is_home?
- Add Dynamic Sidebar to Exisiting WordPress Theme [closed]
- How do I middle-align my header menu items in WordPress [closed]
- How to add Dummy content when active wordpress theme without xml import?
- Is there any reason that other theme elements (such as nav menus) shouldn’t be within the loop?