Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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!

share|improve this answer
    
hey thanks for the quick response and answer. That was really helpful. Like you said, there are plugins that provide shortcode for me to use and there are some that are not. I'll try and see if I'll manage to make it to work. Thanks for the wish! –  ajmalafif Jun 22 '12 at 17:46

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.

share|improve this answer
    
I am have limited background with coding but I'm open to experiment and trying things, so I'll look how I can get em to work. That makes a lot of senses! Maybe I should register a sidebar inside a page as a workaround. Thanks! –  ajmalafif Jun 22 '12 at 17:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.