How Do I Create a Home Link Menu in WordPress?

Creating a Home Link Menu in WordPress is an easy task. First, create a new menu item in the WordPress Menu bar. Next, add the following code to the newly created menu item:

  • Your Website
  • Finally, add the following code to the bottom of your WordPress theme’s header.php file:

    ‘home-link’, ‘container_class’ => ”, ‘depth’ => 1, ‘header_color’ => ‘#FF0000′, ‘header_text_color’ => ‘#000000′, ‘subheader_color’ => ‘#000000′, ‘subheader_text_color’ => ‘#000000′, ‘menu_items’ => array( ‘Your Website’ ), ‘before_title’ => ‘

    ‘, ‘after_title’ => ‘

    ‘, ‘before_subtitle’ => ‘

    ‘, ‘after_subtitle’ => ‘

    ‘ ), ‘primary_menu_items’ => array( ‘Your Website’ ), ‘secondary_menu_items’ => array(), ‘ tertiary_menu_items’ => array(), ‘ child_menu_items’ => array() ), );

    The above code will create a Home Link Menu in WordPress. The “menu_class” parameter will define the menu class name, while the “container_class” parameter will define the menu container class name. The “depth” parameter defines the number of levels of menus that will be created.

    The “header_color”, “header_text_color”, “subheader_color”, and “subheader_text_color” parameters define the colors of the menu header, menu title, menu subtitle, and menu item, respectively. Finally, the “menu_items” parameter defines the list of menu items that will be displayed in the menu.