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 开发者_StackOverflow中文版but no admin bar.
How to bring the admin bar? I think I missed some snippets, while making the theme?
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>
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.
精彩评论