Linux 软件免费装
Banner图

RowanWeb Image Select for ACF

开发者 ryabininvitaliy
更新时间 2026年10月20日 23:51
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

custom fields acf select image select image picker

下载

0.1.0

详情介绍:

Sometimes a select field is really a choice between pictures: a quote author, a team member, a layout preset, a badge. With a plain select you store a slug and then map it to an image somewhere in your theme. With an Image field you end up searching the media library for the same photo again and again. Image Select fixes that. You define the choices once, in the field settings — an image from the media library, a value, a label and any extra fields you need (for example "Position"). Editors then simply click the picture they want, and the post stores only the value, just like a regular select. Requirements This plugin needs Advanced Custom Fields (free or PRO) or Secure Custom Fields to be installed and active.

安装:

  1. Upload the rowanweb-image-select-for-acf folder to /wp-content/plugins/, or install the plugin from the Plugins screen.
  2. Activate the plugin.
  3. In a field group, add a field and choose Image Select as its type.

屏幕截图:

  • The field in the post editor: a grid of image cards and a multi-select dropdown, with the extra fields of the selected choices shown below.
  • The dropdown appearance: thumbnails and search for long lists.

常见问题:

Does it need ACF PRO?

No. The field works the same way in free ACF, ACF PRO and Secure Custom Fields.

How do I use it in a template?

With the "Array" return format, get_field() returns everything about the selected choice: $author = get_field( 'author' ); echo wp_get_attachment_image( $author['image_id'], 'thumbnail' ); echo esc_html( $author['label'] . ', ' . $author['extra']['position'] ); The array contains value, label, image_id, url, alt, width, height, sizes and extra (your extra fields). Whatever the return format is, rwis_get_choice( 'author' ) returns the same array, and rwis_get_choices( 'author' ) returns all choices of the field. The REST API always returns the full array.

What is saved in the database?

Only the value (slug) of the selected choice, or an array of values when multiple selection is enabled — exactly like the built-in Select field.

Can I turn an existing Select field into Image Select?

Yes. Change the field type to Image Select: the existing choices and default value are carried over with the same values, so posts that already have a value keep it. Then add an image to each choice.

Is there a Pro version?

Yes. In the free version extra fields are presets: the same value for every post that uses the choice. Pro adds "Editable in post" for an extra field: the value from the choice becomes a default, and editors can write their own text in each post — for example, a different quote every time from the same author with the same photo and position. Pro also shows ready-to-paste template code in the field settings, built from the field's name, return format and extra fields.

更新日志:

0.1.0