empty homepage link created after wp_nav_menu

I was creating a wordpress theme and wanted to display a navbar with wp_nav_menu() function. But somehow when the page loaded then an empty home link was also created just above the menu. I have no idea 🙁
This is the code

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title><?php bloginfo("name") ?></title>
<?php  wp_head();?>
<body <?php body_class(); ?>>
    <header class="site-header">
        <h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></h1>
        <h5><?php bloginfo('description'); ?></h5>  

        <div class="navbar">
                <?php wp_nav_menu(array('theme_location' => 'primary')); ?>

and the functions.php

function addStyle(){
wp_enqueue_style('style', get_stylesheet_uri()); 
register_nav_menus(array('primary' => __("Header Menu")));

plz help

Read more here: empty homepage link created after wp_nav_menu

Leave a Reply

Your email address will not be published. Required fields are marked *