开发者

How to bring Admin Bar in a wordpress theme?

开发者 https://www.devze.com 2023-04-01 18:19 出处:网络
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 sh

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消