Title tag on home using front-page template not showing

Currently in header I have the following:

title
    ?php wp_title(' | ', true, 'right'); ?
    ?php bloginfo('name'); ?
/title

I tried adding if statement like the following below that did not work it displayed as the following: Roots Restaurant Roots Restaurant

?php if(is_front_page()) {bloginfo('name');}?

It should display as Home | Roots Restaurant

on Home page the title tag looks like the following - Roots Restaurant. So it is missing Home |

Topic wp-title title Wordpress

Category Web


Fixed the bug, pasting the solution here.

        <?php
            if (is_front_page()) {
                echo 'Home | ';
                bloginfo('name');
            }
            else {
                wp_title(' | ', true, 'right');
                bloginfo('name');
            }
        ?>

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.