Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:52:36+00:00 2026-06-14T10:52:36+00:00

I made a 2 language site in WordPress and I need to say that:

  • 0

I made a 2 language site in WordPress and I need to say that:

if html direction is RTL use some code else use another code…

I’ve tried this with the traditional way that I use in Joomla

<?php    if( $this->direction=="rtl"){ ?>

/images/slider/01.jpg” alt=”Slider 01″ title=”#htmlcaption” /> /images/slider/02.jpg” alt=”Slider 02″ title=”#htmlcaption” /> /images/slider/03.jpg” alt=”Slider 03″ title=”#htmlcaption” /> /images/slider/04.jpg” alt=”Slider 04″ title=”#htmlcaption” />

هذا مثال لما يمكن ان يكتب هنا.

/images/slider/01.jpg” alt=”Slider 01″ title=”#htmlcaption” /> /images/slider/02.jpg” alt=”Slider 02″ title=”#htmlcaption” /> /images/slider/03.jpg” alt=”Slider 03″ title=”#htmlcaption” /> /images/slider/04.jpg” alt=”Slider 04″ title=”#htmlcaption” />
PROVIDING COST-EFFECTIVE AND RELIABLE MARINE TRANSPORTATIONS
This is an example of a HTML caption with a link.
This is an example of a HTML caption with a link.
This is an example of a HTML caption with a link.

But it always says there a fatal error.. I think I need to define $this as html page
but how to say that in PHP?

: Using $this when not in object context in C:\AppServ\www\wordpress\wp-content\themes\wp\index.php on line 7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:52:38+00:00Added an answer on June 14, 2026 at 10:52 am

    It appears that it us built into another function called “language_attributes()”. Try this:

    // if ( function_exists( 'is_rtl' ) ) # You may need to utilize this if is_rtl() is not defined
    if( is_rtl() == 'rtl' ){
        // DO RTL code
    }else{
        // DO LTR code    
    }
    

    Based on the following information:

    http://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/general-template.php#L0

    http://wpml.org/2011/06/creating-right-to-left-rtl-wordpress-sites/

    http://codex.wordpress.org/Right-to-Left_Language_Support

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a website that has 2 WordPress installs one for English language
I'm developing second language support for the site. So I made duplicate .ascx and
so I'm making some basic programming language (just for exercise). I've made simple grammar
I made multi-language unicode files and tried to use it in my app, but
So, I need to make changes to an asp.net built site that was recently
I'm currently learning a somewhat obscure foreign language so I made a simple site
I have this code in some of my ASCX files: <%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, Edit, Widget, new
i have a multi language web site... i made two folders in visual studio
I am building a multi-language site with english and french. The site is made
i'm currently working on a wordpress site that needs to have the option to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.