@wphelpcenter Mon-Fri - 8am-6pm Pacific

WordPress HelpCenter

Log in
Plugin Help, Support and Customization

Custom Field Images Support


Installation Instructions

You can use the WordPress plugin installer, or do it manually:

  1. Unzip "Custom Field Images" archive and put the folder into your plugins folder (/wp-content/plugins/).
  2. Activate the plugin from the Plugins menu.

Usage

You can add <?php custom_field_image() ?> inside The Loop in the theme files where you want them to appear. Be sure to check the settings so as not to have duplicate images.

For example, if you want them to appear only when viewing posts by category, add the above function to category.php in your theme directory and uncheck "Display in: content and/or excerpt" from the settings page.

You can also add [cfi] where you want the image to appear in the post content (not excerpt). By default, it is inserted at the beginning.

There is also an additional template tag, called get_custom_field_image() which you can use to display the images however you want. See template-tags.php in the plugin directory for more details.

FAQ

"Parse error: syntax error, unexpected T_CLASS..." Help!

Make sure your host is running PHP 5. Add this line to wp-config.php to check:

var_dump(PHP_VERSION);

Why are the images displayed two times?

Probably because you used the template tag and forgot to uncheck the content, excerpt or feed checkboxes from the Settings page.

Why aren't my images aligning properly?

This is due to your theme's CSS. Check if you have something like this in style.css:

img.alignleft {float:left; margin: 0 1em .5em 0}
img.alignright {float:right; margin: 0 0 .5em 1em}
img.aligncenter {display:block; margin: 0 auto .5em auto}

What if I don't want to use the widget?

You can add <?php cfi_loop($query) ?> directly to your theme files. $query is an optional parameter, which acts as a query string.

How can I delete a custom field image from a post?

Just clear the URL field and save the post.

Changelog

2.2.3

  • confirmed 2.9 compatibility

2.2.2

  • fixed image link on single posts

2.2

  • added border:0; to all styles for feeds
  • if displaying the post, show only the image, without the link
  • if size not available, use default
  • grab the first image in the gallery tab and not the first image uploaded
  • added Russian translation
  • more info

2.1.1

  • fixed warning
  • set default size to thumbnail

2.1

  • added first attachment option
  • better values for get_custom_field_image()
  • bugfix for IE
  • more info

2.0

  • add image by ID and size
  • better template tags
  • default URL
  • fixed l10n
  • more info

1.9

  • l10n
  • better admin page
  • fixed (Insert CFI) button
  • more info

1.8

1.7

1.6

  • [cfi] shortcode
  • duplicate alt. text as title
  • more info

1.5

  • import / export functionality
  • option to automatically link to associated post

1.4

  • extra attributes for image link

1.3

  • one field per image instead of 4

1.2

  • general improvements

1.1

  • page support

1.0

  • initial release

Help, Support & Customization for

Custom Field Images

Call now: 720-288-0398

Using WordPress HelpCenter for help with Custom Field Images supports scribu (the plugin developer).

Plugin Info

Current Version:
2.2.3
Minimum WordPress Version:
2.8
Tested up to WordPress Version:
2.8
Compatible with WordPress MU:
yes
Plugin Author:
scribu

WordPress.org Page

SVN Repository