(Update 2008-05-01: This plugin does not work properly with any WordPress Version above version 2.3.3. Until I can figure out the code changes, I can't support it for version 2.5 or higher.)
Download Custom Field Widgets version 1.2 (2007-12-09)
The Custom Field Widgets plugin lets you create a widget that will extract the key and value pairs from custom fields on specific pages and posts and display it only on those pages or posts. Each widget also includes before and after fields for text you may want to show on all pages and posts sitewide.
The plugin was tested on WordPress version 2.3.1, but it should work on any prior versions that include widget support.
Version 1.2 Changes
- Leaving the title area blank will now only give you a widget with the widget information, without any CSS styling for the title (like the widget titles in my current theme).
- You can choose to display or not to display the most recent post's custom field on the home page. The sitewide text will continue to display regardless of your choice.
Features
- A single widget contains the title, sitewide text before the custom field key, the custom field key, and sitewide text after the custom field key. The text before and after, if not left blank, will display on all pages and posts. If the custom field key matches a custom field key on any page or post, the custom field value will be extracted and displayed only on those pages or posts.
- If all three items are left blank, the widget will not be displayed. If the only item containing text is the custom field key and a page/post does not contain that key, or the value is blank, the widget will not be displayed
- HTML tags are not stripped in the "Sitewide Text" items, allowing you to include things like divisions, ordered lists, unordered lists, and links.
Limitations
- Since HTML tags are not stripped in the "Sitewide Text" items, care are should be taken to use valid markup in those items because it will affect the output of the rest of the page (leaving out a closing tag, for example).
- PHP code is not supported in this plugin. There are other plugins that contain that functionality. See the "Related Links" in the right sidebar.
- Only 9 instances of this widget are supported. Reuse titles and key names as often as possible because each key name requires a different widget in the presentation/widgets section of the WordPress administration.
Live Examples
In the "Recommended Links" widget in the left sidebar, all links except the last link are sitewide. The last link is specific to this page only. The "Related Links" in the right sidebar are specific to this page only.
The "More Links" widget in the right sidebar of "SocialSpark, PayPerPost, RealRank, Google and You" are specific to that post.
Screenshots
These are screenshots of everything used for this page:
Installation
- Upload "custom-field-widgets" to the "/wp-content/plugins/" directory.
- Activate the plugin through the "Plugins'" menu in WordPress.
Upgrade
- Follow the installation steps and overwrite the old files.
- If you want to show the most recent custom field on the home page, you have to select the item on the widget that says "Show Latest Custom Field Contents On Home (Index) Page".
- Check each existing custom field widget and click on "Save Changes" on the Presentation/Widgets administration page.
Usage
- No template editing is required (unless your theme doesn't support widgets).
- Place and edit widgets through the "Presentation/Widgets" administration page in WordPress.
- Click on "Save Changes" on the Presentation/Widgets administration page.
Support
Support is handled through comments on this page.



