Webmaster Information Blog

How to embed or add a widget inside a post or article in WordPress

Widgets make it easy to simply drag and drop items into our WordPress site. But are still limited to widget ready areas in your theme such as sidebars and footers.  So what hapens wen we want to add a widget somewhere else like in post or a page. By default we cannot. So here is a way to use a wordpress plugin to embed or add a widget inside a post or article in WordPresss posts and pages.

We will use amr-shortcode-any-widget plugin

So how we will do it..

1) You need to install and activate amr shortcode any widget.

2) Once you activate the plugin, go to Appearance » Widgets. Set up your widget first in a normal sidebar and check how it works

3) Next, drag and drop the widgets you want to display in your post or page into the Shortcodes sidebar.

4) Now those widgets are ready to be added to your content. Go to the post or page edit screen, and paste the following shortcode wherever you like in your content: [do_widget widgetname]. For example:

[do_widget calendar] if we want to pull the info of the calendar widget

[do_widget pages]

If the widget name has space in it, then you need to add widget name in quotes like this:

[do_widget "recent posts"]

That’s it.

FavoriteLoadingAdd to this article to my favorites list!