Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress WordPress Theme Development WordPress Header and Footer Templates Porting existing headers and footers into WordPress

The wordpress menu bar that appeared on the top of the page is not appearing.

In the video at the last a wordpress menu bar appears on the top, how is it done

10 Answers

Haydn Ellen
Haydn Ellen
20,821 Points

I had the same problem with the wordpress menu not showing, spent hours trying to figure it out, then changed themes, viewed the site, changed back to the theme I am working on and the wp menu was there... cacheing problem! If it doesn't appear then clear your cache :).

Stanley Thijssen
Stanley Thijssen
22,831 Points

Hi Niyaz,

DId you use the wp_footer() function before your end body tag? and the wp_head() function before ur end head tag?

Yes i did use wp_footer() before the </body> and wp_head() before </head>

Stanley Thijssen
Stanley Thijssen
22,831 Points

Can you show me the code you used for your files ?

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title><?php wp_title(); ?></title>

    <?php wp_head(); ?>
</head>
<body>
        <footer class="text-center">
            <p>&copy; Copyright <?php echo date('Y'); ?></p>
        </footer>
    </div>  
    <?php wp_footer(); ?>   
</body>
</html>
Stanley Thijssen
Stanley Thijssen
22,831 Points

Can you try to change the theme to see if its the problem of the theme you are currently using?

No its not coming

Stanley Thijssen
Stanley Thijssen
22,831 Points

Are you using any plugins inside your wordpress install?

None. To give you a clear picture , I am making a new theme from ground up. What all does the theme have until now Are given below +css +js +index.php +functions.php +header.php +footer.php +style.css

Stanley Thijssen
Stanley Thijssen
22,831 Points

Alright i get it. Have you included the get_footer() and get_header() functions to your index.php file then:)?

<?php get_header(); ?>
        <div class="hero-text">
            <h1 class="julius-sans-one">NIYAZ POYILAN</h1>
            <h2>Front-end developer</h2>
            <p><a href="contact.html" id="cta">Contact Me</a></p>
        </div>
<?php get_footer(); ?>  
Stanley Thijssen
Stanley Thijssen
22,831 Points

Lol that's very weird. Are you sure your logged in to the site? And do you get any errors when you turn on the WP_DEBUG mode?

Please try going to http://niyazpoyilan.me and https://niyazpoyilan.me . Something is really weird. When i tried going through the https one i got the wordpress menu, but unfortunately it didnt load the desired font mentioned in functions.php

Stanley Thijssen
Stanley Thijssen
22,831 Points

It really seems very weird. All i can say now is u should try to see if there are any errors with WP_Debug on. And ofcourse make sure ur logged into your site

I figure it out, few lines of code in .htaccess did the wonder. BUT the font is not loading

function np_theme_styles() {
    wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css' );
    wp_enqueue_style( 'julius_font', 'http://fonts.googleapis.com/css?family=Julius+Sans+One' );
    wp_enqueue_style( 'robotocondensed_font', 'http://fonts.googleapis.com/css?family=Roboto+Condensed' );
    wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );

}
add_action( 'wp_enqueue_scripts', 'np_theme_styles' );
Tim Knight
Tim Knight
28,863 Points

You probably want to use protocol neutral resources. The https page won't pull http font resources because they're insecure resources.

function np_theme_styles() {
    wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css' );
    wp_enqueue_style( 'julius_font', '//fonts.googleapis.com/css?family=Julius+Sans+One' );
    wp_enqueue_style( 'robotocondensed_font', '//fonts.googleapis.com/css?family=Roboto+Condensed' );
    wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'np_theme_styles' );