WordPress.org

Ready to get started?Download WordPress

Forums

RTL Themes ? (3 posts)

  1. henz123
    Member
    Posted 5 years ago #

    Hello ,
    There are a lot of LTR beautiful themes ,
    I want to take an LTR theme and make him RTL ,
    can someone provide me the way to do it ?

    ~Thanks , Hen .

  2. henz123
    Member
    Posted 5 years ago #

    help please

  3. chaoskaizer
    Member
    Posted 5 years ago #

    Add the below ↓ code inside functions.php (Admin Dashboard > Themes > Theme Editor > functions.php). Then you'll need to upload ltr.css or rtl.css inside your theme's dir. The function will load "locale" stylesheet base on your WP locale settings.

    <?php
    function print_locale_styles(){
    	if ( ($uri = get_locale_stylesheet_uri()) != ''){
    	    echo '<link rel="stylesheet" href="'.$uri.'" type="text/css" media="all" />');
    	}
    }
    
    add_action('wp_head','print_locale_styles',42);
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic