Title: RTL Support
Last modified: August 31, 2016

---

# RTL Support

 *  [ibrahim6oct](https://wordpress.org/support/users/ibrahim6oct/)
 * (@ibrahim6oct)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/rtl-support-63/)
 * Just wanted to add that for whoever searching for how to apply the RTL into the
   instant article just go to :
    wp-content/plugins/fb-instant-articles/vendor/facebook/
   facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Elements/InstantArticle.
   php
 * Line 266 add :
    $html->setAttribute(‘dir’,’rtl’);
 * 😉
 * [https://wordpress.org/plugins/fb-instant-articles/](https://wordpress.org/plugins/fb-instant-articles/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [aofathy](https://wordpress.org/support/users/aofathy/)
 * (@aofathy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-7286048)
 * Works. Thanks!
 *  [nitays](https://wordpress.org/support/users/nitays/)
 * (@nitays)
 * [10 years ago](https://wordpress.org/support/topic/rtl-support-63/#post-7286127)
 * Hi,
 * When I try to apply your fix, it shows me an error 500 page after I publish posts
   on the website and doesn’t even show up in the Instant Articles feed… What am
   I doing wrong here?
 * Thanks in advance
 *  [yaraanw](https://wordpress.org/support/users/yaraanw/)
 * (@yaraanw)
 * [10 years ago](https://wordpress.org/support/topic/rtl-support-63/#post-7286130)
 * I add $html->setAttribute(‘dir’,’rtl’); to the script . now my articles look 
   like
    `<!doctype html><html dir="rtl"><head><link rel="canonical"......`
 *  but in the front end, it didn’t make any changes. still all articles show LTR,
   which we don’t want, because we use Farsi and Pashto languages which are RTL.
 * I hope the developers of ( Instant Articles for WP) must take this problem series
   and came up with a nice solation.
    I saw in this forum there so many requests
   about RTL Support which are somehow ignored. We really need help in this regard.
 * Thanks
 *  [ziniman](https://wordpress.org/support/users/ziniman/)
 * (@ziniman)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-7286144)
 * Thanks for this post but it only solves part of the problem.
 * It sets the HTML to RTL but many inner tages such as H and others are still doing
   LTR and mixed content of Arabic/Hebrew/Farsi/Etc. and English is unreadable.
 * P.S – Not sure line 266 is the right place now for this change. I’ve added the
   RTL code to the file inside the function toDOMElement after setting HTML element
   at $html = $document->createElement(‘html’);
 *  [Abdallah Nofal](https://wordpress.org/support/users/abdallahnofal/)
 * (@abdallahnofal)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-7286153)
 * Thanks, worked for me but Instead of line 266 just search about
    `$html = $document-
   >createElement('html');` and add this line after it `$html->setAttribute('dir','
   rtl');`
 *  [EhsanAhmad](https://wordpress.org/support/users/ehsanahmad/)
 * (@ehsanahmad)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-8866554)
 * Thank you for the input on RTL guys, I was wondering can RTL be set for individual
   posts, since on my website we both have content in english and arabic ?
 *  [Abdallah Nofal](https://wordpress.org/support/users/abdallahnofal/)
 * (@abdallahnofal)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-8867827)
 * It depends on the plugin that you used for multilingual. WPML supports that, 
   and I think qtranslate too.
 *  [croiger](https://wordpress.org/support/users/croiger/)
 * (@croiger)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-8966603)
 * I trying to type the content in RTL within the search input box without switching
   the OS input method. Eg. Even if the OS input method is EN, I want the content
   typed in the search box to be in RTL language and in RTL direction.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘RTL Support’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/fb-instant-articles_8fa0a4.svg)
 * [Instant Articles for WP](https://wordpress.org/plugins/fb-instant-articles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fb-instant-articles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fb-instant-articles/)
 * [Active Topics](https://wordpress.org/support/plugin/fb-instant-articles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fb-instant-articles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fb-instant-articles/reviews/)

## Tags

 * [RTL](https://wordpress.org/support/topic-tag/rtl/)

 * 8 replies
 * 8 participants
 * Last reply from: [croiger](https://wordpress.org/support/users/croiger/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/rtl-support-63/#post-8966603)
 * Status: not a support question