Image

Овај додатак није испробан са последња 3 главна издања Вордпреса.Можда се више не одржава или подржава и можда има грешке са усклађеношћу са новијим издањима Вордреса.

Image

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]’);

Снимци екрана

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

Постављање

This section describes how to install the plugin and get it working.

  1. Upload widget-instance to the /wp-content/plugins/ directory
  2. Укључите додатак кроз изборник ‘Додаци’ у Вордпресу
  3. Within the editor, you can use the Widget Instance editor button to select
    from available widgets or enter a shortcode following the syntax: [widget_instance id=“[widget_id]“]
  4. Optional step: If you would like to retain the sidebar format of the widget, check the Include Sidebar format checkbox
  5. Within template files you can use the following php snippets:
  • Action: do_action(‘widget_instance’, ‘[widget_id]’);
  • Function: the_widget_instance(‘[widget_id]’);
  • Function: get_the_widget_instance(‘[widget_id]’);

ЧПП

How do I get the widget id?

Of course the editor button automagically retrieves all the available widgets
(and their ids) for you, but if you are using one of the PHP functions, you can
get the available widget ids by looping over the array returned by the function
wp_get_sidebars_widgets()

Прегледи

Image
13. март 2017.
use with other plugin „Category Posts Widget“ and template Customizr very easy
Image
3. септембар 2016.
This plugin has saved me a lot of work and has given me all the answers I was looking for a long time ago. Thank you very much Ben.
Види свих 9 прегледа

Сарадници и градитељи

„Widget Instance“ је софтвер отвореног кода. Следећи људи су допринели овом додатку.

Сарадници

Преведите „Widget Instance“ на свој језик.

Заинтересовани сте за градњу?

Прегледајте код, проверите SVN складиште или се пријавите на белешку градње преко RSS-а.

Белешка о изменама

0.9.5

  • Tested in WordPress 4.9.7

0.9.4

  • Included Immánuel Fodor’s fix for empty dropdown

0.9.3

  • Tested in WordPress 4.2.2, new banner, icons and tinymce button created.

0.9.2

  • Added javascript loader, fix for wordpress installs where wp-includes url is not in the root.

0.9.1

  • Can now select a widget by it’s title as well as its id. The title is in parenthesis after the id.

0.9

  • Tested on 3.5.1
  • Fixed php warnign typo

0.8

  • Tested on 3.4.1
  • Added option for including sidebar formatting
  • The widget’s title will now include the sidebar title markup (More useful than having a plain text title)

0.5

  • Почетно издање