Title: Widgets in Menu for WordPress
Author: Saurabh
Published: <strong>21 outubro, 2014</strong>
Last modified: 27 junho, 2018

---

Pesquisar plugins

![](https://ps.w.org/widgets-in-menu/assets/banner-772x250.png?rev=1013882)

Este plugin **não foi testado com os 3 lançamentos principais mais recentes do WordPress**.
Ele pode não ser mais mantido ou suportado e pode ter problemas de compatibilidade
quando usado com versões mais recentes do WordPress.

![](https://ps.w.org/widgets-in-menu/assets/icon-256x256.png?rev=1013882)

# Widgets in Menu for WordPress

 Por [Saurabh](https://profiles.wordpress.org/saurabhshukla/)

[Baixar](https://downloads.wordpress.org/plugin/widgets-in-menu.zip)

 * [Detalhes](https://br.wordpress.org/plugins/widgets-in-menu/#description)
 * [Avaliações](https://br.wordpress.org/plugins/widgets-in-menu/#reviews)
 *  [Instalação](https://br.wordpress.org/plugins/widgets-in-menu/#installation)
 * [Desenvolvimento](https://br.wordpress.org/plugins/widgets-in-menu/#developers)

 [Suporte](https://wordpress.org/support/plugin/widgets-in-menu/)

## Descrição

Allows you to add Widgets in WordPress Navigation Menus via a custom widget area
and an extra box in menu edit screen.

> **Warning**
> You will need to have some CSS skills for the widgets to display properly in nav
> menus.

#### Usage

[View the screenshots](https://wordpress.org/plugins/widgets-in-menu/screenshots)
for usage instructions.

#### Source code and Contributions

[Fork on Github](https://github.com/yapapaya/Widgets-In-Menu-for-WordPress)

Contributions are always welcome

#### Documentation

 * Most documentation is inline.
 * The hooks (actions and filters) are documented in the [Other Notes](https://wordpress.org/plugins/widgets-in-menu/other_notes/).
 * Some useful stuff is in the [FAQ section](https://wordpress.org/plugins/widgets-in-menu/faq/).

### Hooks

#### Actions

**yawp_wim_pre_callback**

Fires before a widget’s display callback is called. Similar to ‘dynamic_sidebar’
action.

_Parameters_

 * _$yawp\_wim\_widget_ array An associative array of widget arguments.
    1. string _$name_ Name of the widget.
    2. string _$id_ Widget ID.
    3. array|callback _$callback_ When the hook is fired on the front-end, $callback
       is an array containing the widget object. Fired on the back-end, $callback is‘
       wp_widget_control’, see $_callback.
    4. array _$params_ An associative array of multi-widget arguments.
    5. string _$classname_ CSS class applied to the widget container.
    6. string _$description_ The widget description.
    7. array _$\_callback_ When the hook is fired on the back-end, $_callback is populated
       with an array containing the widget object, see $callback.

#### Filters

**yawp_wim_attribute_prefix**

Filters the prefix used in class/id attributes in html display.

_Parameters_

 * _$default\_prefix_ string The default prefix: ‘yawp_wim’

**yawp_wim_widget_params**

Filter the parameters passed to the widget’s display callback. Similar to ‘dynamic_sidebar_params’
filter

_Parameters_

 * _$params_ array
    1. array _$args_ An array of widget display arguments.
    2.  a.  string _$name_ Name of the sidebar the widget is assigned to.
        b.  string _$id_ ID of the sidebar the widget is assigned to.
        c.  string _$description_ The sidebar description.
        d.  string _$class_ CSS class applied to the sidebar container.
        e.  string _$before\_widget_ HTML markup to prepend to each widget in the sidebar.
        f.  string _$after\_widget_ HTML markup to append to each widget in the sidebar.
        g.  string _$before\_title_ HTML markup to prepend to the widget title when displayed.
        h.  string _$after\_title_ HTML markup to append to the widget title when displayed.
        i.  string _$widget\_id_ ID of the widget.
        j.  string _$widget\_name_ Name of the widget. }
    3. array _$widget\_args_ An array of multi-widget arguments.
    4.  a. int _$number_ Number increment used for multiples of the same widget.

**yawp_wim_no_widgets_message**

Filters the html displayed if no widgets are present in the sidebar.

_Parameters_

 * **$no_widgets_output** array The default output

## Capturas de tela

[⌊Add any widget to the 'Widgets in Menu' widget area.⌉⌊Add any widget to the 'Widgets
in Menu' widget area.⌉[

Add any widget to the ‘Widgets in Menu’ widget area.

[⌊Your widgets appear in an new metabox on the Edit Menus screen.⌉⌊Your widgets 
appear in an new metabox on the Edit Menus screen.⌉[

Your widgets appear in an new metabox on the Edit Menus screen.

[⌊Add your widget to any menu, just like you add pages or posts.⌉⌊Add your widget
to any menu, just like you add pages or posts.⌉[

Add your widget to any menu, just like you add pages or posts.

[⌊Your widget starts appearing in the navigation menu.⌉⌊Your widget starts appearing
in the navigation menu.⌉[

Your widget starts appearing in the navigation menu.

[⌊Add css as per taste to finalise the look.⌉⌊Add css as per taste to finalise the
look.⌉[

Add css as per taste to finalise the look.

## Instalação

 * Install the plugin from the ‘Plugins’ section in your dashboard (Go to Plugins
   > Add New > Search and search for _Widgets in Menu for WordPress_).
 * Alternatively, you can download the plugin from the repository. Unzip it and 
   upload it to the plugins folder of your WordPress installation (wp-content/plugins/
   directory of your WordPress installation).
 * Activate it through the ‘Plugins’ section.

## Perguntas frequentes

_The widgets show up, but the display is all messed up._

That’s because the css for the nav menu was never meant to take care of widgets.

For example, if the widget contains a link, you might have to redo it. If it’s a
calendar:

    ```
    .yawp_wim_wrap a {
    width: auto !important;
    padding: 0 !important;
    }
    ```

_How does one style the widgets?_

Inspect element is your friend. Otherwise, the menu item will have the classes _menu-
item-type-yawp\_wim_, _menu-item-object-yawp\_wim_.

Additionally, the widget will be wrapped in a div with the class _yawp\_wim\_wrap_.

Using these selectors, one can style the widgets.

Also, using various filters (see: Other Notes), especially _yawp\_wim\_attribute\
_prefix_, you can change this _yawp\_wim_ prefix to something of your own:

    ```
    add_filter('yawp_wim_attribute_prefix','my_prefix');

    function my_prefix($default_prefix){
        return 'my_prefix';
    }
    ```

The wrapper class will now be _my\_prefix\_wrap_ and so on.

_How does one use the plugin?_

[View the screenshots](https://wordpress.org/plugins/widgets-in-menu/screenshots)
for usage instructions.

  Installation Instructions

 * Install the plugin from the ‘Plugins’ section in your dashboard (Go to Plugins
   > Add New > Search and search for _Widgets in Menu for WordPress_).
 * Alternatively, you can download the plugin from the repository. Unzip it and 
   upload it to the plugins folder of your WordPress installation (wp-content/plugins/
   directory of your WordPress installation).
 * Activate it through the ‘Plugins’ section.

## Avaliações

![](https://secure.gravatar.com/avatar/3f281a842a5705569ec31b8fc604b5fedabb2249b13fd825aa0a82233432e27f?
s=60&d=retro&r=g)

### 󠀁[Great, Even Better When Paired](https://wordpress.org/support/topic/great-even-better-when-paired/)󠁿

 [Vox](https://profiles.wordpress.org/voxclamantis/) 23 setembro, 2020

Great utility and I find it especially graceful when paired with XYZ's PHP & HTML
snippet injectors. Together one can add a drop-down tag cloud to a menu, thus freeing
up valuable screen space for content.

![](https://secure.gravatar.com/avatar/443c7bb53c9fa6cd92d748369b7065026654e5d736ddb922b188b909de80dc92?
s=60&d=retro&r=g)

### 󠀁[Does the job (on 5.2.2)](https://wordpress.org/support/topic/does-the-job-592/)󠁿

 [ecv80](https://profiles.wordpress.org/ecv80/) 20 agosto, 2019

Seems to be working beautifully in 5.2.2 !

![](https://secure.gravatar.com/avatar/3dbda1be11c79113029f642e347a39030133618d9d24fd21d761e12147ceb2cc?
s=60&d=retro&r=g)

### 󠀁[Not Works on version 5.1.1](https://wordpress.org/support/topic/not-works-on-version-5-1-1/)󠁿

 [igorandre](https://profiles.wordpress.org/igorandre/) 18 março, 2019

This plugin not works in this version but works perfectly on versions before 5.

![](https://secure.gravatar.com/avatar/dc3ec00af762c0cc681a346a67ef90fbe54b7d4454478e62b10924a0f79c6697?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-5699/)󠁿

 [sergiobaltimore](https://profiles.wordpress.org/sergiobaltimore/) 4 janeiro, 2019

One of the best plugins I've ever known. Simply and easily it's possible to put 
anything in the menus.

![](https://secure.gravatar.com/avatar/fa6649a475ca3d203237a4c4903d03068b174d256f8d9a5d67bae9a6ff6b184b?
s=60&d=retro&r=g)

### 󠀁[Ridiculously easy to use. Perfect!](https://wordpress.org/support/topic/ridiculously-easy-to-use-perfect/)󠁿

 [senorsam](https://profiles.wordpress.org/senorsam/) 17 outubro, 2018

Simple, perfect. Thank you!

![](https://secure.gravatar.com/avatar/8cf3be1d20432cf42b299269f9e91133db02e8494ff70615c6127e90f5acec26?
s=60&d=retro&r=g)

### 󠀁[Handy plugin!](https://wordpress.org/support/topic/handy-plugin-61/)󠁿

 [JuewelsO](https://profiles.wordpress.org/juewelso/) 1 dezembro, 2017

This worked great for the work-around we were trying to accomplish! Thank you so
much

 [ Leia todas as 21 avaliações ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/)

## Colaboradores e desenvolvedores

“Widgets in Menu for WordPress” é um programa de código aberto. As seguintes pessoas
contribuíram para este plugin.

Colaboradores

 *   [ Saurabh ](https://profiles.wordpress.org/saurabhshukla/)

[Traduzir o “Widgets in Menu for WordPress” para seu idioma.](https://translate.wordpress.org/projects/wp-plugins/widgets-in-menu)

### Interessado no desenvolvimento?

[Navegue pelo código](https://plugins.trac.wordpress.org/browser/widgets-in-menu/),
consulte o [repositório SVN](https://plugins.svn.wordpress.org/widgets-in-menu/)
ou assine o [registro de desenvolvimento](https://plugins.trac.wordpress.org/log/widgets-in-menu/)
por [RSS](https://plugins.trac.wordpress.org/log/widgets-in-menu/?limit=100&mode=stop_on_copy&format=rss).

## Registro de alterações

#### 1.0.0

 * Fixed i18n issues.
 * Added Composer support
 * Fix issues with empty widget titles thanks to Niklas Rosenqvist

#### 0.2.1

 * Fixed notice.
 * Moved attribute prefix to main file.

#### 0.2.0

 * Refactored code completely in line with WP standards.
 * Fixed notices by overriding WP’s default add menu item function.

#### 0.1.0

 * Added translation support.
 * Added label for single menu item.
 * Added Widget type + Set title just like widget areas.
 * Improved js.
 * Added minified js.
 * Better filter for html element attribute.
 * Better inline documentation.
 * Improved readme and help.
 * Added screenshots.

#### 0.0.1

 * Initial Plugin uploaded.

## Meta

 *  Versão **1.0.0**
 *  Última atualização **8 anos atrás**
 *  Instalações ativas **8.000+**
 *  Versão do WordPress ** 3.5 ou superior **
 *  Testado até **4.7.37**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/widgets-in-menu/)
 * Tags
 * [custom link](https://br.wordpress.org/plugins/tags/custom-link/)[menus](https://br.wordpress.org/plugins/tags/menus/)
   [widgets](https://br.wordpress.org/plugins/tags/widgets/)
 *  [Visualização avançada](https://br.wordpress.org/plugins/widgets-in-menu/advanced/)

## Classificações

 4.8 de 5 estrelas.

 *  [  19 avaliações com 5 estrelas     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=5)
 *  [  1 avaliação com 4 estrela     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=4)
 *  [  0 avaliação com 3 estrela     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=3)
 *  [  0 avaliação com 2 estrela     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=2)
 *  [  1 avaliação com 1 estrela     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=1)

[Sua avaliação](https://wordpress.org/support/plugin/widgets-in-menu/reviews/#new-post)

[Ver todas avaliações](https://wordpress.org/support/plugin/widgets-in-menu/reviews/)

## Colaboradores

 *   [ Saurabh ](https://profiles.wordpress.org/saurabhshukla/)

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/widgets-in-menu/)