
By default text direction in our themes is Left to Right. However, if your website is written in Hebrew or Arabic text, then you probably will have to change text direction to Right to Left.
It will require a small code change. Here are all of the necessary steps:
1. Login to your WordPress Admin Panel
2. Navigate to Left Menu -> Appearance -> Editor
3. Open header.php
4. Replace:
<body <?php body_class(); ?>>
with:
<body <?php body_class(); ?> dir=”rtl”>
5. Save changes
Hi, is there any option to change text direction only on one page in my web site? I need to add one page in language which is written from right to left, but all the other pages should be written from left to right.
I appreciate your respond and help. Thank you.
Hi Tuula,
it can be done will additional check of post id (of the page or post you want to change the text direction), i.e. if your page id is 1031, you can update the above code to:
dir="rtl">