WordPress menu not showing.
-
Hello coders,
This is the first time I am creating my custom theme with WordPress but, I am having a problem displaying menus on my website. There are no plugins to deactivate and to check if they are causing the problem. I can see my menus in the console but it is not displayed in the header.
The page I need help with: [log in to see the link]
-
Can you please provide more information? I see a home link on the URL you posted, so there is a menu item there currently. If you are saying that your WordPress menu isn’t showing there, have you looked at this: https://codex.wordpress.org/Navigation_Menus
Thank you for a quick reply. Can you please check now? I have commented on my static menus. And, I cannot see the menu from my end.
Can you paste the code from your theme so I can see how you have implemented the menu? There is a flash of a menu when looking at the page in a “phone-sized” Chrome browser window. It then gets covered up by another menu overlay.
Following is my code in header.php
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>TRAINER JAMES INSTITUTE</title>
<meta charset=”utf-8″>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”description” content=”Elearn project”>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<?php wp_head() ?>
</head>
<body><div class=”super_container”>
<!– Header –>
<header class=”header”>
<!– Top Bar –>
<div class=”top_bar”>
<div class=”top_bar_container”>
<div class=”container”>
<div class=”row”>
<div class=”col”>
<div class=”top_bar_content d-flex flex-row align-items-center justify-content-start”>
<ul class=”top_bar_contact_list”>- <div>+977-980-4909089</div>
- <div>+977-986-2373894</div>
- <div>info@trainerjames.edu.np</div>
<div class=”top_bar_login ml-auto”>
- <i class=”fa fa-google-plus” aria-hidden=”true”></i>
- <i class=”fa fa-pinterest” aria-hidden=”true”></i>
- <i class=”fa fa-facebook” aria-hidden=”true”></i>
- <i class=”fa fa-twitter” aria-hidden=”true”></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!– Header Content –>
<div class=”header_container”>
<div class=”container”>
<div class=”row”>
<div class=”col”>
<div class=”header_content d-flex flex-row align-items-center justify-content-start”>
<div class=”logo_container”>
<?php
if ( function_exists( ‘the_custom_logo’ ) ) {
the_custom_logo();
}
?>
</div>
<?php wp_nav_menu(array(‘theme_location’=>’primary’)); ?>
<nav class=”main_nav_contaner ml-auto”>
<!–<ul class=”main_nav”>
<li class=”active”>home- about us
- courses
- news
- contact
–>
<div class=”search_button”><i class=”fa fa-search” aria-hidden=”true”></i></div><!– Hamburger –>
<div class=”hamburger menu_mm”>
<i class=”fa fa-bars menu_mm” aria-hidden=”true”></i>
</div>
</nav>
</div>
</div>
</div>
</div>
</div><!– Header Search Panel –>
<div class=”header_search_container”>
<div class=”container”>
<div class=”row”>
<div class=”col”>
<div class=”header_search_content d-flex flex-row align-items-center justify-content-end”>
<form action=”#” class=”header_search_form”>
<input type=”search” class=”search_input” placeholder=”Search” required=”required”>
<button class=”header_search_button d-flex flex-column align-items-center justify-content-center”>
<i class=”fa fa-search” aria-hidden=”true”></i>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</header><!– Menu –>
I have also noticed the flash of menus, but when you click the hamburger it overtakes that. Also, the menus displayed in the hamburger is also not working. If I call primary menus in the hamburger gives the list of menus but takes other features like search and others.
The menu shows up in the mobile view but does not show up on the website. I have checked that with other themes but my menu is visible on the other theme.
The topic ‘WordPress menu not showing.’ is closed to new replies.