Currently in header I have the following:

    <?php wp_title(' | ', true, 'right'); ?>
    <?php bloginfo('name'); ?>

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 |

  • 1
    It's clearer to put in your question one piece of code which shows how your entire code looks now.
    – mozboz
    Commented Jul 13, 2020 at 14:16
  • @mozboz updated the description Commented Jul 13, 2020 at 15:16
  • Did you add theme support for the title-tag (in functions.php)?
    – ralphjsmit
    Commented Jul 13, 2020 at 15:19

1 Answer 1


Fixed the bug, pasting the solution here.

            if (is_front_page()) {
                echo 'Home | ';
            else {
                wp_title(' | ', true, 'right');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.