I added a title section in WordPress theme option for site title. I want that if that field is empty then it will display wp_title regular title with front page condition or the field is fill up then the title will display what written in the field. I tried this
<title>
<?php if (is_home()) {
$website_title = ot_get_option('website_title');
if (isset($website_title) && $website_title != "") {
echo $website_title;
} else {
is_front_page() ? bloginfo('description') : wp_title(''); bloginfo('name');
}
} else {
is_front_page() ? bloginfo('description') : wp_title(''); bloginfo('name');
}
?>
</title>
But this code works great in localhost of my computer and when i upload this code in website online it works as regular wp_title, no change happen from theme option. But from localhost theme option change is correctly.
If someone any idea please.