Load custom css in functions.php causing library issue

enter image description here

I’m loading custom css stylesheet in my child theme ‘functions.php’ using this code

if (ICL_LANGUAGE_CODE == 'ar') { ?>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() . '/css/rtl.css' ?>" type="text/css">

When doing so, the media library can’t be loaded, it just stick like this image:

Just a loading spinner with no result, even uploading files is corrupted. When removing the code, everything works perfectly.

Any ideas?

Read more here: Load custom css in functions.php causing library issue

Leave a Reply

Your email address will not be published. Required fields are marked *