Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bring Admin Bar in a wordpress theme?

I created a wordpress theme from scratch in wordpress. After I have completed a simple layout, it renders pretty good. But it is not showing the admin bar. I see the top margin, where the admin bar should be but no admin bar.

How to bring the admin bar? I think I missed some snippets, while making the theme?

like image 463
mrN Avatar asked Aug 30 '11 10:08

mrN


2 Answers

have you added the wp_footer()-function to your theme? That is what calls for the admin bar. So, in your footer.php, you should have something like this:

<div>
    <?php wp_footer(); ?>
</div>
like image 88
Michiel Standaert Avatar answered Sep 28 '22 03:09

Michiel Standaert


First Go to your header.php and Use this code <?php wp_head(); ?> Just before the head tag

Then Go to your footer.php and use this code <?php wp_footer(); ?> before the tag.

That's will work pretty.

like image 23
Ariful Islam Avatar answered Sep 28 '22 02:09

Ariful Islam