Skip to content
Bdazzil Marketing

Blog Web Design

How to Handle Right-to-Left (RTL) Layout in WordPress

A WordPress RTL layout is more than text aligned to the right. When an Arabic visitor lands on your site, the whole interface should flow from right to left: navigation,

9 minute read

A WordPress RTL layout is more than text aligned to the right. When an Arabic visitor lands on your site, the whole interface should flow from right to left: navigation, cards, sliders, forms and even the direction of an arrow on a button. When any of these are missed, the page feels translated rather than designed, and Arabic-speaking prospects notice immediately.

This guide covers the technical side of getting direction right in WordPress: how the core handles RTL, how to write CSS that works in both directions, which components need special care, and how to test before launch. It builds on the way we approach web design for bilingual UAE brands, and on our wider work in Arabic and multilingual UX.

How WordPress handles right-to-left out of the box

WordPress has supported RTL languages in its core for many years. When the site language, or the language of the current page in a multilingual setup, is set to Arabic, a few things happen automatically:

  • The html element gets dir=”rtl”. The language_attributes() function in your theme header outputs both the lang and dir attributes, so the browser knows to lay out text and inline elements from right to left.
  • The is_rtl() function returns true. Themes and plugins use it to load different styles or change behavior.
  • An rtl.css file is loaded if your theme includes one. WordPress looks for rtl.css in the theme root and loads it after the main stylesheet.
  • The admin area and block editor switch direction. Editors writing Arabic content get a right-to-left writing experience in Gutenberg.

For registered stylesheets, wp_style_add_data() with the rtl key tells WordPress to swap a stylesheet for its -rtl.css counterpart when the page direction is RTL. This is the cleanest way to ship separate direction-specific CSS without conditional logic scattered across templates.

What core does not do is fix a theme that was built with hard-coded left and right values. That is where most RTL problems come from.

Write direction-aware CSS with logical properties

The single most effective decision for a WordPress RTL layout is to stop writing physical directions. Instead of margin-left or padding-right, use CSS logical properties that follow the reading direction of the document.

Physical propertyLogical equivalentBehavior in RTL
margin-leftmargin-inline-startApplies on the right
padding-rightpadding-inline-endApplies on the left
left: 0inset-inline-start: 0Anchors to the right edge
text-align: lefttext-align: startAligns right
border-leftborder-inline-startDraws on the right

Logical properties are supported in all current major browsers, so one stylesheet can serve English and Arabic pages without a mirrored copy. Flexbox and CSS Grid also respect direction by default: a row of items in a flex container reverses naturally when dir=”rtl” is set, as long as you have not forced an order with row-reverse or absolute positioning.

When you still need an RTL stylesheet

Older themes and some plugins are written entirely in physical properties. Rewriting them is often not realistic. In that case, a tool such as RTLCSS can generate a mirrored stylesheet during your build, flipping left and right values automatically. It works well for bulk conversion, but review the output: transforms, background positions and some shorthand values can flip in ways you did not intend.

Selectors for the exceptions

For the few rules that genuinely differ by direction, target them with or the :dir(rtl) pseudo-class rather than a body class added by a plugin. This keeps the exceptions visible and tied to the document direction itself.

Components that need deliberate mirroring

Once the base layout flows correctly, the details decide whether the Arabic version feels native. These are the components we check on every bilingual build.

  • Directional icons. Arrows, chevrons, back and next buttons, and breadcrumb separators should point the other way. Icons that do not indicate direction, such as a search magnifier, a checkmark or a phone, should stay as they are. A media play button is conventionally not mirrored.
  • Sliders and carousels. The first slide should sit on the right and swiping should move in the reading direction. Most modern slider libraries support an RTL mode, but it often has to be enabled explicitly.
  • Navigation menus. The logo usually moves to the right and dropdowns open toward the left. Mega menus built with absolute positioning are frequent offenders.
  • Progress indicators and steppers. Step one sits on the right in a multi-step form or checkout.
  • Tables. Column order reverses with direction. Check that numeric columns remain easy to compare.
  • Images with embedded text or direction. A photo of a person looking toward the text on an English page will look away from it once mirrored. Use a different crop or image for the Arabic layout rather than flipping photographs, which reverses logos and signage.

Handle mixed Arabic and English text correctly

UAE content is rarely purely Arabic. Brand names, product codes, email addresses, prices and phone numbers appear in Latin characters inside Arabic sentences. The browser’s bidirectional algorithm handles most of this, but some cases break visibly.

  • Phone numbers. A number such as +971 4 000 0000 can render with the plus sign on the wrong side. Wrap it in a span with dir=”ltr”, or use the bdi element for user-generated values.
  • Form fields for email, URLs and numbers. Set dir=”ltr” on these inputs so the cursor and characters behave predictably while an Arabic-speaking user types.
  • Punctuation at the end of Latin phrases. A full stop after an English brand name inside Arabic text can jump to the wrong end of the line. The CSS property unicode-bidi: isolate on the embedded phrase prevents this.
  • Numerals. Many UAE websites use Western digits (0 to 9) in Arabic content, which audiences read comfortably. Whichever you choose, be consistent across prices, dates and tables.

Typography choices for Arabic pages

Direction is only half of the reading experience. Arabic script has different proportions, and a font stack chosen for English rarely serves it well.

  • Choose a proper Arabic typeface. Families such as IBM Plex Sans Arabic, Noto Kufi Arabic, Cairo or Tajawal are designed for screens and pair reasonably with Latin sans serifs. Load only the weights you use to protect page speed.
  • Increase line height. Arabic letterforms have taller ascenders and deeper descenders, so body text usually needs more line height than the English version.
  • Never add letter spacing to Arabic. Arabic letters connect, and tracking breaks those joins. Reset any letter-spacing inherited from English heading styles in the RTL context.
  • Avoid faux italics. Italic is not a native Arabic convention, and browser-generated slanting looks wrong. Use weight or color for emphasis instead.
  • Review font sizes. At the same pixel size, many Arabic fonts appear smaller than Latin text. A modest size increase on Arabic pages often improves legibility.

Themes, page builders and plugins

Your WordPress RTL layout is only as good as its weakest component. Before committing to a theme or builder, test it in Arabic rather than trusting a feature list that says “RTL ready”.

Themes and builders

Block themes that rely on core blocks and theme.json tend to handle direction well, because core blocks are built with RTL in mind. Popular page builders, Elementor included, support RTL, though custom widgets and third-party add-ons vary. Check headers, footers, popups and any element that uses absolute positioning.

Multilingual plugins

In a bilingual site, direction is set per language. WPML and Polylang both assign the correct locale to each language, so is_rtl() returns true on Arabic pages and false on English ones. Confirm that language switchers, which often sit in the header, do not break the header layout in either direction.

Forms, sliders and booking tools

These are the plugins most likely to cause problems. Date pickers may still start the week on the wrong day or show the calendar arrows in reverse. Validation messages might remain in English. Test every interactive plugin on an Arabic page with real Arabic input before launch.

Testing your WordPress RTL layout before launch

RTL issues are easy to miss when the team building the site works mainly in English. A structured check avoids surprises after launch.

  1. Switch the language early. Set up the Arabic version at the start of the build, not the end, so every template is reviewed in both directions as it is created.
  2. Use real content. Placeholder Latin text in an RTL layout hides wrapping, line height and mixed-text problems. Ask for real Arabic copy or a professional draft.
  3. Check every template. Home, service pages, blog archive, single post, contact, search results, 404 and any WooCommerce pages.
  4. Test on mobile first. Off-canvas menus, sticky headers and floating WhatsApp buttons are where RTL breaks most visibly on phones.
  5. Test forms end to end. Submit Arabic text, confirm the notification email renders correctly, and check that the data reaches your CRM without corrupted characters.
  6. Review with a native reader. A fluent Arabic reader will spot awkward alignment and punctuation that a checklist cannot.

Frequently asked questions

Do I need a separate theme for my Arabic website?

No. A well-built theme serves both languages from one codebase. WordPress sets the direction per language, and a stylesheet written with logical properties adapts automatically. A separate theme doubles maintenance and tends to drift out of sync, so it should be a last resort for themes that cannot be corrected.

Why does my WordPress RTL layout look fine on desktop but broken on mobile?

Mobile menus, off-canvas panels and sticky elements are often positioned with fixed left or right values in separate responsive rules. Those rules are easy to miss when converting to RTL. Search your stylesheets for physical properties inside media queries and replace them with logical equivalents.

Should Arabic pages use Arabic-Indic or Western digits?

Both are understood in the UAE, and many local brands use Western digits in Arabic content for prices, phone numbers and dates. The important point is consistency. Mixing systems across a page, or between the website and invoices, creates friction and makes prices harder to compare quickly.

Does RTL affect SEO?

Direction itself does not influence rankings, but the setup around it does. Correct lang attributes, hreflang between English and Arabic versions, and genuinely written Arabic content help search engines serve the right page to the right audience. A broken layout can also increase early exits from Arabic visitors.

Building Arabic pages that feel native

A carefully built WordPress RTL layout tells Arabic-speaking visitors that the business took them seriously from the first click. The work is mostly systematic: logical CSS, deliberate component mirroring, correct handling of mixed text and a testing routine that includes native readers. Done early in the build, it costs far less than retrofitting after launch.

If your current site treats Arabic as an afterthought, or you are planning a bilingual build and want direction handled properly from the start, we would be glad to review it with you and talk through the options.

Keep reading

Free Growth Audit

Tell us about your project

A few details and we'll reply within one business hour, with a 30-minute call and a written plan to follow.

Sunday to Thursday, 9am to 6pm UAE time. Replies within one business hour.