This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

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.

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

عکس‌های صفحه

  • 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” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

ترجمه “Dynamically Dynamic Sidebar” به زبان شما.

علاقه‌ مند به توسعه هستید؟

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

گزارش تغییرات

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.