CGB Easy Custom Fields

(I’ve put the documentation for this plugin here for want of anywhere else to put it!)

Plugin at abspath/wp-content/plugins/cgb-easy-custom-fields/

Use

Displays custom field key names and values from current post.

CGB Easy Custom Fields is a simple plugin that displays any custom fields that have been set for the current post to be displayed. A shortcode is used to define the location of the fields listing.

Description

A Shortcode handler returns the current custom fields as an html unordered list. One field key name per line is followed by the current value (or comma delimited values, if more than one has been set) for that key.

Current limitations

  1. This only currently works for posts, but could be easily modified to work with other presentations types, such as pages.
  2. Fields may be displayed on posts or on widgets only.

Usage

Display all fields (default) by pasting this shortcode wherever you want it –

[cgb_easy_custom_fields]

Use the fields inclusion list to identify one or more fields to be included. Include named fields like this –

[cgb_easy_custom_fields fields="keyname1, keyname2, etc"]

Use the notfields exclusion list to identify one or more fields to be ignored. Displays all fields except those named, like this –

[cgb_easy_custom_fields notfields="keyname1, etc"]

Also take note of the following –

  • The inclusion or exclusion list should be in quotes
  • Field names should be separated by commas
  • Field names should be exactly how they appear in the post editing screen
  • Space characters are allowed
  • Case is sensitive
  • The fields and notfields lists cannot both be used in the same shortcode definition