Widgets make it easy for users to simply drag and drop items into their WordPress site. However their usage is limited to the widget ready areas. What if you want to embed widget in a Page or Post? Well, in this article, we will show you how to add WordPress widgets in posts and pages.
First thing you need to do is install and activate amr shortcode any widget. Once you activate the plugin, go to Appearance » Widgets. Next, drag and drop the widgets you want to display in your post or page into the Shortcodes sidebar.
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:
If the widget name has space in it, then you need to add widget name in quotes like this:
[do_widget “latest posts”]
If the widget does not show up in your content, then you need to use the widget id in the shortcode. First, make sure that you have added the right widget in the shortcodes sidebar, and you have added the shortcode with the widget name in your post or page. Publish that post/page and open it in a new browser window. Add the following string at the end of the page URL like this:
It will show you debug information with widget IDs. Look for widget ids under the Shortcodes Sidebar.
That’s it. We hope that this article helped you add widgets into your WordPress posts or pages.