How to Insert a Widget into a WordPress Post or Page

If you know what WordPress shortcodes are, then chances are you know how useful they can be.  A lot of WordPress plugins come with shortcodes built in, meaning you can insert them into your web page, anywhere you like.  An example would be to insert a widget into the body of a WordPress post.  However, not all plugins have shortcodes.  In this case, you can use a simple WordPress plugin which allows you to create a shortcode for any widget.  The following video shows how I take a WordPress plugin without shortcode functionality and create a shortcode for it, then insert it into a WordPress page.


AMR Shortcode Any Widget plugin – the plugin that allows you to create a shortcode for any widget.


Here is a the 300×250 pixel version of that widget inserted into this post:

[do_widget id=currencyfair-calculator-widget-5]
Note that to align the widget in the center (or to the right), switch over to the “text” tab of the editor, and wrap the shortcode in a <div> tag and set the align property, like this:
align center
Like this tutorial?  Have comments?  Please leave them below…  Thanks!

Want to Learn WordPress?

WordPress is an amazing platform for building any type of website.   It’s used by large corporations and small mom & pop sites.

You may also like


3 thoughts on “How to Insert a Widget into a WordPress Post or Page”

  1. Hi Andy,

    I have been using this plugin for some months now and can confirm it works very well. It is refreshing to see that the developer updates the plugin to keep up with WordPress versions.

    The problem I found, was that the widgets I installed in the body text inherited the sidebar css styles I had added to my child theme styles.css file. This looked odd and I wanted a more natural integration.

    I found I could override these styles within styles.css by adding modified on-page css using the Simple Custom CSS Plugin. I think a more streamlined solution might be to target the widget with the new code directly from within the child theme styles.css. As a quick fix though, this does work.

    Many thanks for your very informative newsletters.

  2. Hello Andy,

    Thanks for the tutorial. Very clear. The one thing I’d like to know is how to *center* the shortcode so the widget is centered on the page. Using the “align” format in the text editor doesn’t work for me. Thanks again!

Leave a Comment

Your email address will not be published. Required fields are marked *

Create your own WordPress Theme

It's built in to WordPress using Gutenberg, and my new course shows you how.