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.
Resources:
AMR Shortcode Any Widget plugin – the plugin that allows you to create a shortcode for any widget.
Example
Here is a the 300×250 pixel version of that widget inserted into this post:
4 thoughts on “How to Insert a Widget into a WordPress Post or Page”
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.
Andrzej
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!
I’ve added a bit more to the tutorial above, to show you how to do this.
Hello Andy,
Thanks for the tutorial. Using the “align” format in the text editor doesn’t work for me. Thanks again!