Put an extra check box on “Page Attributes” widget

You can create a custom field, give it a value of lang=’ur’ and check for it in your header.php.

  1. Add the custom field from the Custom Fields box. Let’s call it page_lang. Give it a value of lang=’ur’.

In header.php:

<?php
global $post;
$lang = get_post_meta(get_the_ID(), 'page_lang', true);
?>
<body <?php body_class();?> <?php echo $lang;?>>

Each page you want to show this lang, you just select the ‘page_lang‘ custom field and give it the value you want (you have the option to write any value you want, thus any other language than ‘ur’).

Leave a Comment

tech