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.








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.


0 条回复 A文章作者 M管理员
有新私信 私信列表