Kieranmv95
Kieranmv95

Reputation: 828

WP Admin Bar Missing

I am very new to making WordPress themes and i have recently started developing my first one. I have got some content working and the home page works now. But when i log into WordPress and view the site there is no Admin bar at the top (as I am used too). I think I have just forgotten something in the one of the files that makes it appear but I am not 100% sure.

I presume this will be applied in the heading so below is my header.php

<html>
<head>
    <title>Tutorial theme</title>
    <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.css">
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                <p class="site-description"><?php bloginfo( 'description' ); ?></p>
            </div>
        </div>

It is very basic but this is because i am new. I am developing this theme from scratch as a personal Project. If you need any more info just ask and i will update the question

Upvotes: 0

Views: 818

Answers (2)

redburn
redburn

Reputation: 532

The toolbar can be turned on/off from the Administration > Users > Your Profile, [...]

If you have turned the Toolbar on in your profile settings, but still don't see it on the front end of your site, it may be that your theme does not call wp_footer() in its footer.php file, or the Toolbar may be disabled by a plugin.

http://codex.wordpress.org/Toolbar

Upvotes: 0

Matt Gibson
Matt Gibson

Reputation: 38238

Your theme needs the basic plugin API hooks that allow WordPress to inject code at various points. For example, the admin bar is inserted when WordPress writes to the footer when you call wp_footer(). I think it may also use styles inserted at wp_head().

So, basically, follow the Theme Documentation Advice and add calls to wp_head(), wp_footer(), wp_meta(), and comment_form() (if applicable) to your template code in the places it tells you to, and your admin bar should magically appear.

Upvotes: 3

Related Questions