How can I input a single right-to-left paragraph (Hebrew) into an English page/post?

You can add a hebrew shortcode to wrap around your hebrew text and then use the CSS2 direction attribute to indicate the text direction.

e.g.:

In your themes functions.php:

function hebrew_shortcode( $atts, $content = null ) {
   return '<p lang="he" DIR="RTL">' . $content . '</p>';
}
add_shortcode( 'hebrew', 'hebrew_shortcode' );

Your content:

[hebrew]Hebrew styled right to left text![/hebrew]

edit: I’ve updated to use the dir html attribute ( spec docs said do nto sue css to indicate right to left ) and to use a p element instead

Leave a Comment