Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am having this problem where I created my website first, with a menu in my header.php page. And then I wanted to transform my website into a wordpress website, so I did what I had to do, but the problem is that I still can't figure out a way to transform the navigation menu in header.php into a menu that works on wordpress.

I have tried all solutions given by the wordpress tutoriels as well as some forums, but everything I try creates an ugly menu on top of my desired menu that is not even clickable. Here is a picture of the result so farenter image description here

now if you look closely, "test" is the menu that I was able to make, while the words with the blue background is my real menu. But when I have my mouse over it, nothing even happens.

Here is my header.php:

    <?php
/**
 * The Header template for our theme
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Thirteen
 * @since Twenty Thirteen 1.0
 */
?><!DOCTYPE html>

<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]--><head>
<?php /* Get our main menu Navigation bar */ ?>
<?php get_template_part( 'navigation', 1 ); ?>
<?php /* Get our top menu Navigation bar */ ?>
<?php get_template_part( 'navigation', 2 ); ?>


<?php wp_nav_menu( array( 'theme_location' => 'header-menu', 'container_class' => 'main_menu' ) ); ?>


    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width">
    <title><?php wp_title( 'entendrelimage', true, 'right' ); ?></title>
    <link rel="profile" href="http://www.entendrelimage.univ-paris1.fr/‎">
    <link rel="pingback" href="<?php bloginfo( 'entendrelimage_url' ); ?>">
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
    <![endif]-->
    <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
        <header>
        <div id="main_menu">
        <nav>
            <ul>
                <li><a href="#page2">Décryptage</a></li>
                <li><a href="#page3">Symboles</a></li>
            </ul>
        </nav>
        <br/ class="annuleFloat">

        <ul id="recherche">
                <li><a href="www.google.com"><img id="glo" src="<? bloginfo('stylesheet_directory'); ?>/images/glosaire_off.png" alt=""/></a></li>
                <li><img src="<? bloginfo('stylesheet_directory'); ?>/images/ligne_top_right.png"/></li>
                <li><a href="#"><img id="rech" src="<? bloginfo('stylesheet_directory'); ?>/images/recherche_off.png" alt=""/></a></li>
        </ul>
        </div>
        <div id="logo">
            <a href="#page1"><img src="<? bloginfo('stylesheet_directory'); ?>/images/logo.png" alt=""/></a>
            <br/ class="annuleFloat">
        </div>
        </header>
<!-- #masthead -->

        <div id="container">
        <div class="main">

and this is the part of code that I put in functions.php:

    function register_my_menu() {
  register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'register_my_menu' );

So if anybody can tell me the problem it would be great!! I am desperately stuck at this one

share|improve this question
    
I guess you have either invalid HTML or CSS problem. It is going to be hard to give any advice without actually being able to see your site. –  Mark Kaplun Jan 26 at 5:37
    
The first thing that pops in my eye is that you call the navigation menus in your head section of the html. Please validate that. –  fischi Jan 29 at 9:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.