Allows you to add custom widget content on a post-by-post basis from the edit post screen.
The My Snippets plugin allows you to define custom widget content on a per-post basis from the edit post screen.
While the plugin is both simple and powerful, it’ll never replace such plugins as Widget Logic and Widget Context nor is that the plan. What it does is allow you to add custom widget content from the edit post screen without having to go to your Widgets screen in the admin for additional configuration.
If you need professional plugin support from me, the plugin author, you can access the support forums at Theme Hybrid, which is a professional WordPress help/support site where I handle support for all my plugins and themes for a community of 70,000+ users (and growing).
If you’re a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it’s GitHub repository.
Yes, I do accept donations. If you want to buy me a beer or whatever, you can do so from my donations page. I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
my-snippets.zip
folder.my-snippets
folder to your /wp-content/plugins
directory.I love plugins like Widget Context and Widget Logic, which allow you to add contextual widgets. But, the thing that those plugins don’t do is give you a way to add widget content without visiting the Widgets admin screen in WordPress.
I wanted a way to add a widget on a per-post basis when writing the post itself, so this plugin was born.
No, it’s not a replacement of the aforementioned plugins but, rather, a complementary plugin.
First, you need to add the “My Snippets” widget to any sidebar on your site. It won’t appear on the front end just yet though.
Any time you write a post, you can add a custom snippet title and content in the “My Snippets” meta box. If you write something in the meta box, it will automatically be shown in place of the widget when viewing that post on your site. If nothing is written in the meta box, nothing will be shown for the post.
Yes, it works for all publicly-queryable post types. Basically, if your post type has its own “page” on the front end of the site, you can add custom snippet content.
That’s pretty much it. This is an extremely simple plugin.