WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Plugins» How to Add WordPress Widgets in Post and Page Content

How to Add WordPress Widgets in Post and Page Content

Last updated on July 7th, 2013 by Editorial Staff
141 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Add WordPress Widgets in Post and Page Content

Widgets make it easy for users to simply drag and drop items into their WordPress site. Even though you can extend the power of default WordPress widgets, they are still limited to widget ready areas in your theme such as sidebars and footers. Wouldn’t it be nice if you could add widgets in your post or page content without writing a single line of code? 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.

Adding WorPress widgets in post or page content

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]

[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. Now you can add WordPress widgets in your post and page content. If you want to add a little more style to your widgets, then you might want to check out our article on how to make WordPress widgets colorful and less boring. Most widgets have titles, but if you don’t want to display them, then use this tutorial on how to hide widget titles.

Troubleshooting

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:

http://www.example.com/page-title/?do_widget_debug

It will show you debug information with widget IDs. Look for widget ids under the Shortcodes Sidebar.

We hope that this article helped you add widgets into your WordPress posts or pages. For questions and feedback please leave a comment or tweet at us by following @wpbeginner.

141 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

68 Comments

Leave a Reply
  1. Hove says:
    Jan 22, 2020 at 2:53 pm

    It does not work for me: “Widget not in any sidebars”.

    Reply
    • WPBeginner Support says:
      Jan 23, 2020 at 8:55 am

      You would want to first ensure your widget you’re trying to add works in a regular widget area

      Reply
  2. Mick Holmes says:
    Jan 11, 2020 at 3:06 am

    Fantastic! Thank you!

    Reply
    • WPBeginner Support says:
      Jan 13, 2020 at 11:28 am

      You’re welcome :)

      Reply
  3. Pat Walter says:
    Sep 28, 2019 at 2:53 pm

    THANK YOU SOOO MUCH FOR THE amr shortcode any widget. I have tried and tried to get other shortcodes working, but could not. But your plugin really helped me. Thanks again.

    Reply
    • WPBeginner Support says:
      Sep 30, 2019 at 10:20 am

      Not our plugin but glad our recommendation could help you :)

      Reply
  4. Hannah says:
    Jun 27, 2019 at 12:49 pm

    Hello,

    Is there anyway you can show us how to do this WITHOUT using a plugin? Please let me know, thank you.

    Sincerely,
    Hannah

    Reply
    • WPBeginner Support says:
      Jul 1, 2019 at 11:38 am

      We will be sure to add that to our tutorials where it would make sense but writing out the code for a custom plugin would act the same as if you were installing a plugin to handle this. :)

      Reply
  5. Edu Hoffmann says:
    Jun 16, 2019 at 12:21 pm

    Thanks for sharing!
    This tip was very usefull and save lots of my time

    Reply
    • WPBeginner Support says:
      Jun 17, 2019 at 10:43 am

      Glad our guide could be helpful :)

      Reply
  6. Chris Beller says:
    Mar 12, 2019 at 3:26 pm

    Hi I just tried doing this in block editor and I cannot find a way to get the widget block to the right of my posts…. Like how the sidebar looks on my blog page. How can I do this?

    Reply
    • WPBeginner Support says:
      Mar 13, 2019 at 10:16 am

      If you mean you want your widgets on the side widget area, you would want to reach out to your theme’s support for if there is a widget area there for posts and pages.

      Reply
  7. Danny says:
    Feb 11, 2019 at 5:50 am

    Thanks for this.
    What will be the name of the “Top Posts & Pages Widget” by Jetpack ?

    Reply
    • WPBeginner Support says:
      Feb 12, 2019 at 11:11 am

      It should use that name, if not you would want to reach out to the plugin’s support and they should be able to assist.

      Reply
      • Danny says:
        Feb 12, 2019 at 12:53 pm

        Ok,
        Another thing:
        I tried testing it on sidebar and I got something like: There is nothing to see here (meaning there are no new posts, or so i thought)
        Is there a way to show my most popular posts, no matter the date it was published?

        Reply
        • WPBeginner Support says:
          Feb 13, 2019 at 11:18 am

          You would want to reach out to the support for the popular posts widget that you are using for what they use for showing the posts.

  8. Erik says:
    Dec 2, 2018 at 10:25 am

    Great tool, works well. No hassles installing and setting up. Thanks

    Reply
  9. Tivon says:
    May 19, 2018 at 1:59 pm

    Hi,

    I can’t seem to add another icon. When I click the button nothing happens.

    Reply
  10. Karan says:
    Dec 19, 2016 at 2:10 am

    Not working on clipper them

    Reply
  11. Andres says:
    Nov 18, 2016 at 6:42 am

    How can I add a widget to the Post Page (i.e Blog)?

    Reply
    • Yo says:
      Jan 21, 2017 at 11:46 am

      You have to add the amr widget plugin to do that. Its easy though.

      Reply
  12. Siddiqa Pathan says:
    Oct 21, 2016 at 8:49 am

    Perfect! Thank you so much for the Tutorial!

    Reply
  13. Pete says:
    Sep 29, 2016 at 3:20 am

    AMAZING! – thank you so much. You have saved me from pulling any more hair out..

    Reply
  14. marsha says:
    Sep 16, 2016 at 6:44 pm

    guys….please help me….
    what should i do to make wordpress download manager and easy digital download run into native worpress post…i dont want to make a post into their plugin but wanted to post something in my native wordpress post…what should i do then???
    so i can get the valuable thing both of this plugin just in my native wordpress

    help me please

    Reply
  15. karyn says:
    Sep 12, 2016 at 10:05 am

    Hi I really don’t understand these codes and html things. I want to add the categories widget in my archives category page. I also want to add the monthly archives widget to the very same Archives page wjat do I do? I am really lost.

    Reply
  16. Shona says:
    Aug 12, 2016 at 12:15 pm

    Amazing – worked perfectly. Thank you for this useful tutorial!

    Reply
    • WPBeginner Support says:
      Aug 12, 2016 at 11:28 pm

      Glad you found it helpful. Make sure you follow us Facebook.

      Reply
  17. Carol says:
    Aug 8, 2016 at 4:45 pm

    works like a charm, thanks so much!!!

    Reply
    • WPBeginner Support says:
      Aug 9, 2016 at 6:17 pm

      Hey Carol, glad you found it helpful. Make sure you follow us on Twitter to get more WordPress tips and tricks

      Reply
  18. Palla Sridhar says:
    Jul 10, 2016 at 10:20 am

    Hello.
    I actually have a different requirement.
    I want to add some text and html link inside post content for all posts with the same category. For a different category, I want to include different text and html link. Hope you understand. Please help

    Reply
  19. Inam U Khan says:
    Mar 14, 2016 at 9:53 am

    It’s helpful post if anyone wants to use any widget within a post or a page.

    Reply
  20. Rahul says:
    Feb 4, 2016 at 1:23 pm

    hi there, how can i use text widget in post. i used code [do_widget text] but it isn’t working. i want to insert image slider in text widget please help me with this way or any other way. thanks

    Reply
  21. channing says:
    Jan 10, 2016 at 11:11 pm

    this isn’t working properly.

    I’ve installed the plugin and pasted the code at the bottom of the page, and when i push preview the widget ends up being the header as opposed to showing up where i put it.

    Reply
  22. JB says:
    Dec 9, 2015 at 11:23 am

    Is this supposed to work with the Customizr theme? The widgets seem to work in left and right side bars, but not within content. I even installed a plugin that provides widget IDs, so I can include proper ID in the [do_widget ] short code.

    How can I fix this?

    Reply
  23. Jeffrey Beckers says:
    Aug 5, 2015 at 3:34 pm

    Hi,

    I’m using your plugin to show the widget of recent topics. But the shortcode isn’t generating in the widget.

    Reply
  24. Gopi says:
    Jul 18, 2015 at 3:19 am

    This is an amazing plugin. Is there an way to change the design of the plugin

    Reply
  25. Louis says:
    May 6, 2015 at 9:24 am

    Hi, this is a great plugin. Thank you for it.
    Is there a way to change the styles on the widget in the AMR without it affecting the widgets throughout the rest of the site? Mainly I’m concerned with the padding of 20% which centers the content awkwardly on my page. If I change it to 0% in the .widget css it looks great but the widgets on the other pages are all messed up. Is there a way to apply separate CSS to the AMR content without it affecting the other widgets?

    Reply
  26. Mackenzie says:
    Apr 29, 2015 at 7:38 pm

    Thank you for this, it works great in the content of one of my pages. However, it doesn’t seem to work on my homepage. The homepage edit area IS different since I have to go to theme options>appearance instead of the individual page…Wordpress just gives me a place to add text, although I use HTML there for other things that seem to work fine. I tried adding the shortcode to the “home” edit page also with no luck.

    Another page on this site said to add the following to functions.php in my child theme:
    add_filter(‘widget_text’, ‘do_shortcode’);

    But just adding that doesn’t help either. There must be some setting with the homepage that won’t allow this. Any ideas? Thanks

    Reply
    • WPBeginner Support says:
      Apr 29, 2015 at 10:45 pm

      Your theme may be using a custom template. Contact your theme’s support.

      Reply
  27. Coach Maria says:
    Apr 24, 2015 at 6:35 pm

    Would this work to put content at the bottom of each post? (Like a subscription form?)

    Reply
  28. Sudhakar Goverdhanam says:
    Apr 7, 2015 at 4:17 pm

    It worked fine, Thanks

    Reply
  29. Zaheer Abbas says:
    Feb 10, 2015 at 8:43 am

    Thank u …. Newsletter plugin now working in pages and posts as well as it works only in right sidebar

    Reply
  30. gmanob says:
    Oct 20, 2014 at 2:33 pm

    I downloaded and activated this plugin then I go to Appearance – Widgets but cannot find Shortcode. Any ideas? Thanks!

    Reply
  31. Andrea Valgoi says:
    Oct 18, 2014 at 4:59 am

    Hello, I have this problem. The widget on a specific page (which works perfectly) overlaps the menus if i scroll down.

    Any ideas how to solve it?

    Reply
  32. Yuriy says:
    May 21, 2014 at 4:56 am

    Awesome! Thank you! Great plugin! It completely meet my expectations!

    Reply
  33. Asad Iqbal says:
    Apr 7, 2014 at 7:12 pm

    Its a pleasure for me to use this plugin.Very nice approach .

    Thanks .

    Reply
  34. Tom says:
    Mar 15, 2014 at 5:32 pm

    Thanks! This worked.

    Reply
  35. Nicole @ The Pixel Boutique says:
    Feb 20, 2014 at 1:27 pm

    Thank you! Just what I needed to make a separate page for Jetpack subscription signup. Great plugin I’ll use often. :)

    Reply
  36. anand kumar says:
    Dec 19, 2013 at 12:39 am

    how i get short codes for php/text widgets .
    this plugins is not showing any thing for these

    Reply
  37. Jessi says:
    Dec 1, 2013 at 6:43 am

    This plugin is perfect! I have a question though: How does one align the widget to the left of the post with the text wrapping around it? What is the exact CSS code that needs to be used?

    Reply
  38. Shonda says:
    Nov 27, 2013 at 10:54 pm

    Love your widget. However, how do you edit a widget to be able to use it on more than one post with different data? For instance, the widget I am using ask what category and how many post in that category I want to display.

    As it stands, I have to edit the widget in the short code area, then I can place it in one page. Now I want to add the widget to two other pages with a different category and # of posts. Thanks in advance.

    Reply
    • WPBeginner Support says:
      Nov 28, 2013 at 10:15 am

      you can add multiple widgets by dragging them into shortcodes sidebar on the widgets screen and using the widget id to display it in the post.

      Reply
      • Paul says:
        Dec 10, 2013 at 11:38 am

        Thanks a lot for this plugin !! Me too I would like to post the same widget in different pages but where do you find the widget id ?

        Reply
  39. Sameer Verma says:
    Nov 23, 2013 at 4:44 am

    Hi,

    Is there anyway to display the widget id in all post. I want to display a widget below post in all type of posts .

    Actually i need a share this site below to all posts and pages .
    How i can??

    Reply
  40. rianne says:
    Nov 21, 2013 at 8:53 am

    Hey! I added the widget in the main sidebarthing at the widget page and put the code in the page. I see the widget, wich is really cool, but i also see this message:

    Sidebar Shortcodeswith sidebarid Shortcodes empty or not defined.
    Widget dooodl! not in sidebar with id Shortcodes and with name Shortcodes

    How can i delete that? And why is it there?
    thanks! greetings

    Reply
    • WPBeginner Support says:
      Nov 23, 2013 at 11:18 am

      The widget you want to display on the page, you need to drag and drop that widget to the shortcodes sidebar first. Then use the shortcode in a page to display the widget.

      Reply
  41. Krishna veni says:
    Oct 19, 2013 at 9:56 am

    Hi,

    Is there anyway to display the widget id in all post. I want to display a widget below post title in all post

    Regards
    Krishna Veni

    Reply
  42. Cindy tucker says:
    Oct 13, 2013 at 6:40 pm

    Help! I want to place a subscription widget under each post and I don’t know any code. How do I do this?

    Reply
    • kory s says:
      Jan 14, 2014 at 12:16 am

      You could simply add the widget to the Shortcode widget and then call the Shortcode in your template where you want it to go…

      See wpbeginners other helpful post at https://www.wpbeginner.com/wp-themes/how-to-use-shortcodes-in-your-wordpress-themes/

      Reply
  43. Flame Denise says:
    Oct 1, 2013 at 11:28 pm

    How about if mw widget is a Text with a title “Our Services”?
    All these shortcodes don’t work:

    [do_widget Text: Our Services]
    [do_widget Text:Our Services]
    [do_widget “Text: Our Services”]

    Reply
    • Alexander Bradley says:
      Apr 29, 2014 at 7:17 am

      Don’t know why the writer didn’t get back to you. I had the same issue but found that the title for the Widget is just called Text. Try that and see if it works. Not sure what happens if you have multiple widgets called Text but I guess I see soon enough.

      Reply
  44. Daniel Nielsen says:
    Sep 22, 2013 at 1:59 pm

    Hi

    What to call it if you wanner use the same widget more then one time in one page:

    [do_widget count down]
    &
    [do_widget count down]

    Reply
  45. Ashish says:
    Sep 11, 2013 at 1:08 pm

    for example
    [do_widget “recent posts”] this one
    how can i align it in such a way that it appears with a specific height and width
    aligned to the right side of the post or in the middle of the post with the text surrounding it ?
    Is it possible ?

    Reply
    • WPBeginner Support says:
      Sep 11, 2013 at 1:23 pm

      you can tweak alignment using CSS.

      Reply
  46. Sarah says:
    Aug 9, 2013 at 3:43 pm

    Is this missing any steps? I’ve tried the debug and it still doesn’t work. When I debug, I get a very generic name for the widget “text-4”.

    Is there a way to set the widget I’d manually?

    Is there a problem with the amr shortcode widget plugin? Eg is this still the plugin to use as of aug 2013?

    Reply
    • Aistis says:
      Oct 4, 2013 at 4:04 pm

      Either the plugin has updated or this tutorial was incorrect to begin with.

      Use [do_widget id=recent-posts-2] or [do_widget “Recently in news”]

      Reply
      • WPBeginner Support says:
        Oct 5, 2013 at 12:01 am

        The tutorial is correct, we double checked it and you are doing exactly what we showed in the tutorial above.

        Reply
  47. Prashant Ghai says:
    Jul 8, 2013 at 1:20 pm

    This is an amazing tip. My blog has a single column theme and this is just the kind of thing i needed. Thanks a lot.

    Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
RafflePress - WordPress Giveaway and Contest Plugin
RafflePress
Giveaway and Contest Plugin for WordPress. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
LiveChat logo
LiveChat Inc Coupon
Get a 30 day free trial and 30% OFF LiveChat, one of the best live chat service providers for WordPress users.
LearnDash
LearnDash Coupon
Get the lowest price on the best learning management system (LMS) plugin for WordPress.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.