Title: Dynamically Dynamic Sidebar
Author: ShinichiN
Published: <strong>2015 年 11 月 16 日</strong>
Last modified: 2016 年 9 月 9 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/dynamically-dynamic-sidebar.svg)

# Dynamically Dynamic Sidebar

 作者：[ShinichiN](https://profiles.wordpress.org/shinichin/)

[下载](https://downloads.wordpress.org/plugin/dynamically-dynamic-sidebar.0.7.zip)

 * [详情](https://cn.wordpress.org/plugins/dynamically-dynamic-sidebar/#description)
 * [评价](https://cn.wordpress.org/plugins/dynamically-dynamic-sidebar/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/dynamically-dynamic-sidebar/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/dynamically-dynamic-sidebar/#developers)

 [支持](https://wordpress.org/support/plugin/dynamically-dynamic-sidebar/)

## 描述

This plugin enables you to create unlimited custom sidebar/widget areas and switch
existing areas. You can do this without touching your theme.

This plugin utilizes term meta api and so it works only with WordPress 4.4 and above.

Your theme needs to use `is_active_sidebar()` when calling `dynamic_sidebar()` function.

This will work.

    ```
    if ( is_active_sidebar( 'sidebar-1' ) ) {
        dynamic_sidebar( 'sidebar-1' );
    }
    ```

This doesn’t work.

    ```
    dynamic_sidebar( 'sidebar-1' );
    ```

If you only want to output your custom sidebar, put this code on where you want 
to display the sidebar in your theme.

    ```
    do_action( 'dynamically_dynamic_sidebar' );
    ```

[This Plugin published on GitHub.](https://github.com/ShinichiNishikawa/Dynamically-Dynamic-Sidebar/)

ウィジェットエリアをいくつでも定義し、カテゴリやタグ、カスタム分類ごとに差し替え
たり、投稿・ページ・カスタム投稿から使いたいサイドバーを指定したりすることができ
ます。「スクリーンショット」のタブをごらんいただくと、イメージが湧きやすいと思い
ます。

## 屏幕截图

 * [[
 * First, you add your own dynamic sidebar areas. It’s unlimited.
 * [[
 * Widget areas will appear on your admin panel. Put your widgets inside them.
 * [[
 * Choose which widget area you want to use for categories, tags and all the custom
   taxonomy terms.
 * [[
 * You can also choose specific sidebar area for each post, page and custom-post-
   type post.

## 安装

 1. Upload `dynamically-dynamic-sidebar` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to `/wp-admin/themes.php?page=dynamically-dynamic-sidebar`, which is located
    under `Appearance`

## 常见问题

  How many widget areas can I create?

Unlimited.

  How do I switch existing sidebar or widget area?

Choose the target widget area in admin panel. The admin page for this plugin is 
located at Admin > Appearance > Dynamically Dynamic Sidebar.

You need to make sure that the call of dynamic_sidebar is properly wrapped with 
is_active_sidebar() conditional tag.

    ```
    if ( is_active_sidebar( 'sidebar-1' ) ) {
        dynamic_sidebar( 'sidebar-1' );
    }
    ```

Or you can just output your dynamically created sidebar with `do_action( 'dynamically_dynamic_sidebar');`,
too.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Dynamically Dynamic Sidebar」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ ShinichiN ](https://profiles.wordpress.org/shinichin/)

[帮助将「Dynamically Dynamic Sidebar」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/dynamically-dynamic-sidebar)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/dynamically-dynamic-sidebar/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/dynamically-dynamic-sidebar/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/dynamically-dynamic-sidebar/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/dynamically-dynamic-sidebar/)。

## 更新日志

#### 0.1

 * Released on github

#### 0.3

 * Get terms ancestors’ allocated widget area for posts.

#### 0.4

 * 2016/05/16
 * Bug fix. Now you can reset the dynamically chosen sidebar to default.

## 额外信息

 *  版本 **0.7**
 *  最后更新：**10 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.4 或更高版本 **
 *  已测试的最高版本为 **4.6.30**
 *  语言
 * [English (US)](https://wordpress.org/plugins/dynamically-dynamic-sidebar/)
 * 标签
 * [sidebar](https://cn.wordpress.org/plugins/tags/sidebar/)[widget](https://cn.wordpress.org/plugins/tags/widget/)
   [widget area](https://cn.wordpress.org/plugins/tags/widget-area/)
 *  [高级视图](https://cn.wordpress.org/plugins/dynamically-dynamic-sidebar/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/dynamically-dynamic-sidebar/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/dynamically-dynamic-sidebar/reviews/)

## 贡献者

 *   [ ShinichiN ](https://profiles.wordpress.org/shinichin/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/dynamically-dynamic-sidebar/)