This thread is resolved. Here is a description of the problem and solution.
Problem: The client needed the correct CSS code to apply a specific font for the Persian language on their website, after previously receiving incorrect information. Solution: We advised the client to use the CSS language selector
html[lang="fa-IR"]
for the Persian language. To apply the font across various elements like body, h1, h2, etc., the client should use the following code:
html[lang="fa-IR"] body { font-family: 'kalameh-fa' !important; }
If this solution does not resolve the issue or seems outdated, or if it does not apply to your case, we recommend opening a new support ticket. We also highly suggest checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Our next available supporter will start replying to tickets in about 3.15 hours from now. Thank you for your understanding.
Background of the issue:
I translated the site into Arabic according to your instruction and the code you sent. The code you sent is in the form html[lang="ar"] body { font-family: 'KalamehWeb' !important; } and it was responding on the site. Now, after some time, I want to translate the site into Farsi. My chosen font with the code html[lang="en"] body { font-family: 'kalameh-fa' !important; } does not apply.
Symptoms:
The chosen font for Farsi translation does not apply.
Questions:
Why is the chosen font for Farsi translation not applying?
Is there a different code needed for applying fonts to Farsi translations?
I apologize for the typo that occurred in the previous ticket, I meant html[lang="fa"].
The main language of my site is English. So I don't need a code
What code should I use for the Persian language to apply the font on the site?
And also, as I said before, the font will be applied only by putting all the items of the different parts of the site, such as body h1 , h2 , etc., and the code will not be applied in the way you sent the code (html[lang="ar"])
Sorry for the delay, it has been a pretty full queue in the past few days.
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of the site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.