Widgets菜单不显示在wordpress仪表板的外观下

Widgets菜单不显示在wordpress仪表板的外观下,wordpress,function,widget,themes,sidebar,Wordpress,Function,Widget,Themes,Sidebar,我正在开发一个wordpress主题,但仍然坚持widgetizing我的wp主题,我已经遵循了几个教程,但仍然没有工作。“我的小部件”菜单不显示在仪表板的“外观”下。这是我的函数和侧边栏: function.php: 前几天我用这本很棒的教程制作了一个小部件,效果很好,如果你按照所有步骤操作,你会看到小部件选项出现在你的管理端:前几天我用这本很棒的教程制作了一个小部件,它工作正常,如果您按照所有步骤操作,您将看到小部件选项出现在您的管理端:将这行代码放在function.php中 if (fu

我正在开发一个wordpress主题,但仍然坚持widgetizing我的wp主题,我已经遵循了几个教程,但仍然没有工作。“我的小部件”菜单不显示在仪表板的“外观”下。这是我的函数和侧边栏: function.php:


前几天我用这本很棒的教程制作了一个小部件,效果很好,如果你按照所有步骤操作,你会看到小部件选项出现在你的管理端:

前几天我用这本很棒的教程制作了一个小部件,它工作正常,如果您按照所有步骤操作,您将看到小部件选项出现在您的管理端:

将这行代码放在function.php中

if (function_exists("register_sidebar")) {
register_sidebar();
}
把这个放到sidebar.php

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php $image = new WP_query ('showposts=1');
if(have_posts()) : while($image->have_posts()) : $image->the_post; ?>

  <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to 
 <?php  the_title_attribute(); ?>"><?php postimage(); ?></a>

 <?php endwhile; endif; rewind_posts; ?>

将这行代码放在function.php中

if (function_exists("register_sidebar")) {
register_sidebar();
}
把这个放到sidebar.php

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php $image = new WP_query ('showposts=1');
if(have_posts()) : while($image->have_posts()) : $image->the_post; ?>

  <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to 
 <?php  the_title_attribute(); ?>"><?php postimage(); ?></a>

 <?php endwhile; endif; rewind_posts; ?>