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?
- Javascript localization doesn’t load. How to Internationalize javascript without plugin?
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- Get the blog page URL set in Options
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- Worthwhile to restrict direct access of theme files?
- How Do I Protect My Premium WordPress App Theme from Copying?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- How to add posts to custom menus?
- WordPress Theme Preview Image
- How To extend WP_Customize_Control
- What is the difference between front-page.php and home.php? [duplicate]
- How can I get page slug
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- When to use _e and __ for the translation?
- What is a Theme textdomain?
- How to show a custom meta box on the “Quick Edit” screen?
- How to add CSS class to custom logo?
- How to add custom css file in theme?
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- Display Search Result Count
- wp_nav_menu(), how to change class?
- theme path in javascript file
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- Making update notification functionality for my themes
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- How do I remove a pre-existing customizer setting?
- Minimum Template Files for Theme Development
- What’s the difference between home.php and index.php?
- pass object/JSON to wp_localize_script
- get_template_part vs action hooks in themes
- Theme Activate Hook
- How to Link External jQuery/Javascript files with WordPress
- Solutions for generating dynamic javascript / CSS
- wp_redirect() – headers already sent
- Can I create my own “Recent Posts” widget or customize the existing one?
- Custom single template for a specific category
- how can I add an icon/image for a child theme?
- How can I add a URL field to the attachments window?
- The the_post_thumbnail without srcset?
- The proper way to include/require PHP files in WordPress
- Get the first image from post content (eg.: hotlinked images)
- after_setup_theme always runs
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Do I actually need to link my theme’s style.css in the theme files