Have you ever wanted to display content on your WordPress sidebar, but not have it be the same content across your entire site?
How about displaying an image gallery for each individual post on the sidebar? Or having information specific to the
subject of that particular post displayed?
Based On Post let’s you do just that. This simple, but extremely useful WordPress plugin is designed to let you place a widget on a single sidebar of
your wordpress blog, (in the furture, multiple sidebars will be supported), and for each post or page, specify the text or HTML code that is to go in the widget. The input box for the data
is on the Post or Page writing screen.
Now you can also add Based On Post to your Templates instead of your Sidebar. It still relies on data being entered in the fiels inside the
Create Post or Create Page screens. To add it to your template, open one of the template files either in the editor of your choice or inside
wordpress itself, and add the following code to your template file:
<?php do_action( 'msbop_template_tag' ); ?>
Friendly Tip: You should only use Template Tags if you know how to edit your PHP code…wrongly placed code can mess up your site!
* Display arbitrary information based on the page that the visitors view, instead of the same content throughout your site.
Use Post title as the widget title, or use your own custom title.
Use HTML, Plain Text, even scripts and shortcodes in the widget!
*You will find the option for using the Post Title as the Widget Title in the widget box when you add it to your sidebar.
- Download the zip file from the wordpress repository
- Upload the folder ‘based-on-post’ to the ‘/wp-content/plugins/’ directory
*Alternativly to 1 and 2, add the plugin through wordpress itself.
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to your ‘Widgets’ Menu, and place the ‘Based On Post’ widget in the sidebar where you would like your content to appear
- Go to any Post or Page, or create a new one, and find the newly added ‘Based On Post’ Section. (It may be hidden at first,
to make it visible, click ‘Screen Options’ at the top, and ensure ‘Based on Post’ is checked)
- Input your custom Title and Text or HTML in the input form.
- Update/Publish your content.
- View your Website and look for your new content in the position of the widget.
- I can’t find the Based On Post input box on my ‘Add Post’ or ‘Add Page’ screen.
Please make sure that you’ve placed a checkmark next to it under the ‘screen options’ tab inside the
‘Add Post’ or ‘Add Page’ screen. Sometimes wordpress automatically hides extra fields.
- The Widget always uses the Post title instead of my own custom Title.
To turn the ‘Post Title as Widget Title’ option on or off, go to the ‘Appearance->widgets’ section of your wordpress
dashboard, and open the ‘Based On Post’ Widget. There is a single checkbox to turn it on or off. (see Screenshot 1)
Contributors & Developers
“Based On Post” is open source software. The following people have contributed to this plugin.Contributors
- Added support for Custom Post Types, as requested by users.
- Added the requested Ability to Use a Template Tag to display the data from Based On Post in your template.
- Updated the way the Widget displays. Will now only display on Single Posts and pages, to prevent it from showing up where several pages or posts are listed.
- Changed how the plugin handles deactivation/uninstallation. Will now keep all entered data after activation, will remove all associated data on uninstallation/deletion.
- First Stable Release Version.
- Ability to add a single Based On Post widget to the sidebar.
- Shortcodes Added
- Development and Testing.