How can I display widget in a Page or Post?

I am trying to display some widgets (Quora & Goodreads) widgets inside Page or Post. How do I do that without displaying it inside Sidebar?

Related posts

Leave a Reply

2 comments

  1. There’s no easy way to do this. Many plugins that provide a widget also provide a
    shortcode (text in brackets that you can put in your post like this: [quora]). I have no idea whether either of your widgets also come with shortcodes.

    Though I’ve never used them, there are some plugins that claim to help you do this. (Like this one.)

    If there isn’t a shortcode and you can’t find a plugin, your last option is to write your own shortcode that runs the_widget(). You’ll need some low- to moderate-PHP ability to do this. I’ve never tried it, so I can’t say whether there are any caveats to this solution. With a quick google search, I was able to find this tutorial for making a shortcode that runs the_widget(). Good luck!

  2. Widgets, by design, are to be used in the sidebar. If you want widgets in your page or post, you’ve got two options: rewrite the code to work in a template, or register a sidebar inside the page or post template. Sidebars do not have to be on the side, after all.