You are loading the rtl.css using the WordPress automatic way, that is, having a rtl.css in the theme folder will be loaded by WordPress automatically if it presents and direction of current language ir rtl (you should add this information to the question, it has been difficult to figure it out how you are loading the file). This process defines locale_stylesheet_uri
that you can use to modify the locale stylesheet URL, so you can add the version parameter to it:
add_filter( 'locale_stylesheet_uri', function ($localized_stylesheet_uri) {
$time_ver = filemtime( get_stylesheet_directory() . '/rtl.css' );
return add_query_arg( array('ver' => $time_ver), $localized_stylesheet_uri );
});
If you need also handle dependencies you will have to load rlt.css file with wp_enqueue_style
just like any other css file. No way of handling dependencies with the “auto” way.
Related Posts:
- How to create .pot files with POedit?
- Getting failure when using filemtime() with wp_enqueue_style
- Why is wp_head() creating a top margin at the top of my theme header?
- Enqueue Stylesheets After Theme’s “rtl.css”
- Use __($str) and _e($str) to translate strings with HTML
- How to control initial wp_head() output?
- How wp_cache is supposed to work, and does it help with performance?
- How can I get wp_head() as a string instead of echoing it?
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- What is the purpose of an extra file for translation?
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Translated strings not appearing – what am I missing?
- Cache Busting using htaccess Rewrite rule?
- wp_head() not inserting the default stylesheet style.css
- Why wp_head() function not loading style.css?
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- Internationalization and functions that use it
- Theme translation not applying
- How to make a local cache of mshots images
- 2 localizations inside a WordPress theme
- Should I change text-domain of TGM library inside theme?
- Change locale by detecting viewer’s browser language setting and let them choose prefered language after
- Single translation for many locales
- What is the safe way to print tracking code / pixel code before tag or tag
- How to modify default controls in WordPress theme customizer
- Should i clear the plugin cache for cache busting?
- Does the textdomain have to be the theme’s name?
- Take control of WordPress before functions.php
- Do I need to include a textdomain if my theme doesn’t support translation?
- using Options Framework – can “theme-textdomain” domain be changed?
- Translate a theme with a PO file
- How to use Canonical URL meta tag to avoid duplicate content issues with WP home pages
- My wordpress theme name isn’t updating straight away
- how to unlocalize theme/plugin?
- When I save changes for css and js in my WP localhost env windows 10 the changes don’t take effects immediately!
- How to set different localization file for different users?
- Menu names not getting translated
- How to generate a rtl.css file for themes?
- Enqueue Stylesheets After Theme’s “rtl.css”
- Display Today’s date outside the loop?
- What are these variables and where are they documented?
- How to output wp_enqueue_style() in HTML head instead of footer
- WordPress theme Modifications not showing up on live server
- How to use esc_attr__() function properly to translate a variable that contains string?
- Is there a way to prevent wp_head from outputting self-closing tags?
- wp_nav_menu(), how to change class?
- pass object/JSON to wp_localize_script
- What difference does it make if I use index.php as HTML wireframe versus writing each main template file as a full HTML document?
- Google Maps not displaying in wordpress using Google Maps Javascript API
- Hide certain pages / posts on wp-admin, show custom filter
- Problem with registering menus – What to do when other solutions aren’t working?
- add_theme_support(‘my-custom-feature’)
- Displaying wp menus by name without using theme locations
- Adding dashicon fonts to the admin of pre 3.8 installs
- Do I really need the div class entry?
- How do I translate this string – PHP syntax question
- How to manipulate “add media” pop-up
- WordPress Gutenberg Theme: Structure, Hierarchy and Custom Templates
- How to Take Ownership of a Theme
- Best way to start becoming a wordpress developer
- How to make content editable from admin page?
- Redirect Old .php URLs to New WordPress Page
- Widget items disappearing
- create-guten-block in wordpress theme?
- WordPress navbar with logo in middle [closed]
- Is the current Theme version number cached somewhere?
- PHP Template way of coding for wordpress theme development
- Custom form in theme template displaying internal server error upon submission
- Admin: sub menu doesnt display under apperance when activate my themes
- Get data from style.css file and from from users->your profile
- How to dequeue css files?
- How to disable thumbnail filter for a specific template part or image size?
- get_template_part() doesn’t work
- Show for a particular page ID only title and short summary
- reduce duplicate code in wordpress
- Assign custom classes to the divs inside the loop
- Theme Action to hook for one time only function [duplicate]
- Proper way to move a Bootstrap site to WordPress [closed]
- iPad WordPress theme?
- Adding link post format to theme and permalink to rss feed
- custom Background not showing after upgrade?
- Does single webpage do not need navigation to create a slug in permalink?
- Posts Page shows Classic Editor interface not Gutenberg
- Get gallery images description not work for some images id
- How to get full native language instead of iso?
- Is a multipurpose theme an alternative to modifying or creating a theme from scratch?
- Two instances of the theme folder in the URL
- I want to change the author name
- Does any JavaScript file load automatically for index.php file?
- Display content on Single page
- Trouble creating custom sanitization function when uploading video files
- How to store and retrieve the attachment alignment?
- Custom image size doesn’t work
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- The content not wrapped in paragraph tags with get_page_by_title()
- Not Found when using activity stream as front page with BuddyPress
- Import/Export WordPress demo
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- Why we do need wp_enqueue_script() function?
- Is it possible to use “wordpress.org Theme Handbook” look&feel as a theme in my own site? [closed]