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

---

Search plugins

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

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.

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

# Widgets in Menu for WordPress

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

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

 * [Details](https://fuc.wordpress.org/plugins/widgets-in-menu/#description)
 * [Reviews](https://fuc.wordpress.org/plugins/widgets-in-menu/#reviews)
 *  [Installation](https://fuc.wordpress.org/plugins/widgets-in-menu/#installation)
 * [Development](https://fuc.wordpress.org/plugins/widgets-in-menu/#developers)

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

## Description

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

## Screenshots

 * [[
 * Add any widget to the ‘Widgets in Menu’ widget area.
 * [[
 * 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.
 * [[
 * Your widget starts appearing in the navigation menu.
 * [[
 * Add css as per taste to finalise the look.

## Installation

 * 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.

## FAQ

_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.

## Reviews

![](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/) Siilto 23, 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/) Juko 20, 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/) MBooy 18, 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/) Siilo 4, 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/) Yarkomaa 17, 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/) Bowte 1, 2017

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

 [ Read all 21 reviews ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/)

## Contributors & Developers

“Widgets in Menu for WordPress” is open source software. The following people have
contributed to this plugin.

Contributors

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

[Translate “Widgets in Menu for WordPress” into your language.](https://translate.wordpress.org/projects/wp-plugins/widgets-in-menu)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/widgets-in-menu/), 
check out the [SVN repository](https://plugins.svn.wordpress.org/widgets-in-menu/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/widgets-in-menu/)
by [RSS](https://plugins.trac.wordpress.org/log/widgets-in-menu/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 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

 *  Version **1.0.0**
 *  Last updated **8 years ago**
 *  Active installations **9,000+**
 *  WordPress version ** 3.5 or higher **
 *  Tested up to **4.7.33**
 *  Language
 * [English (US)](https://wordpress.org/plugins/widgets-in-menu/)
 * Tags
 * [custom link](https://fuc.wordpress.org/plugins/tags/custom-link/)[menus](https://fuc.wordpress.org/plugins/tags/menus/)
   [widgets](https://fuc.wordpress.org/plugins/tags/widgets/)
 *  [Advanced View](https://fuc.wordpress.org/plugins/widgets-in-menu/advanced/)

## Ratings

 4.8 out of 5 stars.

 *  [  19 5-star reviews     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/widgets-in-menu/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/widgets-in-menu/reviews/#new-post)

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

## Contributors

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

## Support

Got something to say? Need help?

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