0
votes

I am creating a wordpress site using custom theme. I want to set the home link for my theme's index.php file. when i am using permalink it changes link for all the other links and not working. i am using wp_nav_menu to get the menus in header.php. How can i assign the href to index.php for home menu. can any one help? thank you in advance.

Header.php:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="<?php bloginfo("charset"); ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title><?php bloginfo('name'); ?></title>

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,800' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Lato:400,700,300' rel='stylesheet' type='text/css'>
    

    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>">
    
    

     </head>

  <body>

    <!-- Static navbar -->
    <div class="navbar navbar-default navbar-static-top" role="navigation">
      <div class="container h-sectionHeader">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>

          <a class="navbar-brand" href="index.php"><img src="<?php echo esc_attr( get_option('logo-setting') ); ?>" class="logo" alt="logo systenics"></a>
        </div>
<!--         <?php bloginfo('template_directory'); ?>/images/logo-systenics.png
 -->        <div class="navbar-collapse collapse">
               <?php 
$defaults = array(
  'theme_location'  => 'primary',
  'menu'            => '',
  'container'       => 'div',
  'container_class' => '',
  'container_id'    => '',
  'menu_class'      => 'nav navbar-nav',
  'menu_id'         => '',
  'echo'            => true,
  'fallback_cb'     => 'wp_page_menu',
  'before'          => '',
  'after'           => '',
  'link_before'     => '',
  'link_after'      => '',
  'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
  'depth'           => 0,
  'walker'          => ''
);

wp_nav_menu( $defaults ); ?>
         </div><!--/.nav-collapse -->
      </div>
    </div>
1

1 Answers

0
votes

In word press admin panel go to appearance >> menu

There is default home page in page section while you click on view all you can see home link. Which is redirection to index.php.you can drag it to your home menu.!

enter image description here