跳到内容

Widget Instance

v0.9.4

Global · 2012年6月11日 上架

Display an active widget added to a sidebar within the editor or by using a shortcode, function or action.

正在使用
400+
评分
3.4 / 5
累计下载
1.4 万
最近更新
2018年7月11日
9 条评价需要 WordPress 2.9.1+已测试到 4.9.36

贡献者

截图

The Widget Instance editor button
The Widget Instance editor button
The editor dialog for inserting a specific widget instance
The editor dialog for inserting a specific widget instance

Widgets are normally displayed as part of a sidebar using the dynamic_sidebar()
function. There is the_widget function for static widgets, but there is no
equivalent for specific widgets configured in the Appearance > Widgets area.

The Widget Instance plugin allows WordPress users of all abilities to display
these widgets outside of the sidebars they have been assigned to.

Features

  1. A wysiwyg editor button for selecting available widgets,
  2. A shortcode [widget_instance id=”[widget_id]”],
  3. A theme action do_action(‘widget_instance’, [widget_id]) and finally
  4. Utility functions for developers get_widget_instance and widget_instance

Usage

  • [widget_instance id=”[widget_id]”]
  • do_action(‘widget_instance’, ‘[widget_id]’);
  • the_widget_instance(‘[widget_id]’);
  • get_the_widget_instance(‘[widget_id]’);

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums