Widgets on Pages Options

How to display Widgets inside posts and pages

I was faced the need to be able to place extra manageable content inside a wordpress page’s core content… and without an existing plugin available to do this I thought I’d write one of my own.

The output was the Widgets on Pages wordpress plugin which is at time of writing at version 0.0.4. The plugin basically allows the author to add a shortcode to their wordpress page or post which will then add the content of a predefined Widget area (or sidebar) at that point in the post/page

Widgets on Pages Options

The plugin approach allows the user to add a lot of extra control to their wordpress sites without the need for any coding or markup skills (PHP, MySQL, HTML etc).

UPDATE: In version 0.0.4 you are able to define an unlimited number of separate sidebars and call these all separately within the wordpress content.

19 thoughts on “How to display Widgets inside posts and pages”

  1. Good plugin, any way the number can be expanded from 5 to say 10 for example, if hard coding is required that’s fine, jut a little restrictive with 5.

    Thanks again for the plugin.

  2. Lee,

    Thanks for comments, I really appreciate them.

    There is no real reson I set 5 to the maximum other than I thought that any more than that would become a management headache.

    I can quite easily update this for you is this is something you’d like to see increased. What sort of maximum would like see being realistic?

  3. Goog plugin more i receive falatl error on activate, i disable google plugins and up memory_limit in php.ini to 128 more error dont kill

  4. Hey Leandro,

    I’m not entirely sure I understand what you;re saying about the fatal error… is it that you have now fixed this by modifying the php.ini? If that’s right then perhaps this is to do with the plugin having to buffer the normal sidebar output to make sure that the widgets are inserted into the wordpress posts in the correct position.

  5. Hello! This is a great plugin! I am having difficulties though, trying to get it to show up on the front end. The website I am putting it on, is http://www.stockpilingdads.com I’d appreciate your advice! The site is ran on the Thesis theme. My email is weetelfers at gmail dot com.
    Thanks!

  6. Hi Todd, I’m the Creative Clans author. I found the problem, and it has nothing to do with your plugin. Sorry for the inconvenience. I already rectified my post.

    And the unlimited number of widget areas in the new version of your plugin is a great improvement! Even if one never uses more than a certain number, the fact that when needed you can extend that number is a good thing.

  7. Nicklas, you can do if your frontpage is a static page which you edit via admin section… if not then you’d be better off modifying your theme to add this. If it’s the latter then searching for “adding a sidebar wordpress theme” should give you some decent advice.

    Todd

  8. Hey Todd- awesome, awesome plugin.

    Question:

    I’m using WP Ecommerce, and am trying to get a plug in to appear in one of my product descriptions. But, this is not technically a page- the product page is dynamically generated. So, when I put in the short code where I want it, nothing happens (the short code text just shows up on my page).

    Your plugin works elsewhere on my site when I actually put it onto a “page.”

    Any thoughts on how to solve this?

    Tushar

  9. Hey Tushar,

    Thanks… your query is a good one.
    I think perhaps you would need to add the widget via the template tag which you could add to the php which is responsible for displaying the products.

    Hope this helps.
    Todd

  10. Hi Todd,

    I really like this plugin!

    The only thing is that I can’t get rid of the bullets even after I selected the ‘Enable Styling’ setting in the Widgets on Pages options page like you said.

    When I went to the plugin editor I noticed that the css file says “inactive”. I’m not sure if that has anything to do with it, but I would really like to get this fixed.

    Any help would be greatly appreciated 🙂

  11. Hey Georgette,

    Do you have a link to the site so I can take a look?
    If you don’t want to post it here please feel free to mail me.

    I have identified a weakness in the CSS which I have fixed in an upcoming 0.0.11 release but if I could confirm that this also works for you that would be aces.

    Ta,
    Todd

  12. Hi Todd,

    I’m having the same problem Tushar is. Modern WordPress @ 09-Mar-2013. I added an optional sidebar name in settings, then inside that sidebar in the widget area I dropped the widget I want to show up in the page. Then in the page I replaced the content with merely the shortcode (which the sidebar shows me, [shortcode in brackets]). But the only thing it shows on the frontside of the page is the shortcode.

    You wrote, “I think perhaps you would need to add the widget via the template tag which you could add to the php which is responsible for displaying the products.”

    I don’t know what this means. Normally you click buttons to add plugins and widgets and you don’t have to edit PhP. I can, I am just not sure what specifically to do. Since it sounds this is a recurring issue for your plugin users, do you think maybe you could provide some kind of steps-on-what-to-do that are more specific?

    The plugin is awesome. If I could get it to work. It’s such a great idea!

    PJ

  13. Never mind! I figured it out. In the modern wordpress there is a little checkbox ‘run PHP code’ below your posting box. If you check that, it all works perfectly. 🙂

Leave a Reply

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