Elementor Pro插件如何调用ACF自定义字段?

当我们把elementor插件升级到Pro版本后,就可以解锁自定义字段的功能,本篇文章就为大家分享下如何调用ACF自定义字段。

Why use Elementor with ACF

Advanced Custom Fields (ACF) brings limitless possibilities for adding extra data to WordPress content by creating custom fields. Elementor allows you to dynamically insert the ACF custom field data directly into your Elementor designs with all the styling options you’ve come to expect from Elementor.

Note: Elementor officially supports ACF 5 and up.

How To Add ACF To a Single Post Template

  1. Go to Elementor > My Templates > Add New
  2. Choose Template Type > Single. Name your template and click Create Template
  3. Click on the Document Settings gear icon
    Elementor Pro插件如何调用ACF自定义字段?

    located at the bottom left of the panel

  4. Click the Preview Settings tab
  5. Under Preview Dynamic Content select the post type you wish to preview
  6. Drag a widget that makes use of dynamic content (e.g. Text widget)
  7. Click on the Dynamic icon Elementor Pro插件如何调用ACF自定义字段?
  8. Choose ACF Field
  9. Once selected, click again on ACF Field
  10. In Settings > Key, select the custom field you want to display.
  11. The options in the Advanced tab are optional. Options include:
    Before: Text to automatically appear before the custom field data
    Fallback: Text to display if custom field has no data
    After: Text to automatically appear after the custom field data
  12. Style the custom field widget as you would normally, using the widget’s Style tab.

Custom ACF fields we support:

Note: Any ACF fields not included in this list, such as repeater fields, are not supported at this time.

Text:

‘text’,
‘textarea’,
‘number’,
‘email’,
‘password’,
‘wysiwyg’,
‘select’,
‘checkbox’,
‘radio’,
‘true_false’,

Pro
‘oembed’,
‘google_map’,
‘date_picker’,
‘time_picker’,
‘color_picker’
‘date’
‘date_time_picker’


URL:

‘email’,
‘image’,
‘text,
‘file’,
‘page_link’,
‘post_object’,
‘relationship’,
‘taxonomy’,
‘Url’


Image:

‘image’
‘gallery’


Examples of use

Movie Review Website

A movie review website might use ACF to set up several custom fields, including Director, Year, Genre, Rating, etc. ACF makes it easy to add this data to each movie review, while Elementor brings the magic needed to beautifully display the data on the front end.

Elementor Pro插件如何调用ACF自定义字段?

Watch a video tutorial showing an example of creating a movie review website with ACF and Elementor.


Real Estate Listings

Real estate websites commonly need to use custom fields to allow them to display real estate listings, which must display data such as Number of Bedrooms, Number of Baths, Size of Home, and Price. With Elementor’s integration with ACF, this data can be stylishly displayed on each listing, with no coding required.

Elementor Pro插件如何调用ACF自定义字段?

Watch a step-by-step tutorial to learn how to create a dynamic real estate site using ACF and Elementor.

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索