설명
AgilePress Content Block for ACF is the easiest way to display Advanced Custom Fields (ACF) data on your site without writing PHP code.
This plugin bridges the gap between ACF and the Block Editor, allowing you to render field values, loop through Repeaters, and display Image Galleries using custom HTML templates directly in the editor.
Key Features:
- Display ACF on Frontend: Render any custom field value using
{field_name}. - No Coding Required: Stop editing theme files; build templates inside the block.
- ACF Repeater Support: Easily loop through repeater rows with simple tags.
- Group & Nested Fields: Access complex data structures like
{group:subfield}. - Dynamic HTML: Full control over your HTML structure and CSS classes.
Supported Syntax:
- Simple fields:
{field_name}(Text, Number, Email, etc.) - Group fields:
{group_name:sub_field_name} - Repeaters & Galleries:
{{repeater_name}}content{{/repeater_name}}
Requirements:
* Advanced Custom Fields (Free or PRO) installed and activated.
Usage Examples
1. Display Simple Field:
<div class="product-info">
<h1>{product_name}</h1>
<p>Price: {price}</p>
</div>
2. Display Group Field:
<div class="contact-details">
<p>Email: {contact:email}</p>
<p>Phone: {contact:phone}</p>
</div>
3. Display Repeater or Gallery:
<ul class="image-gallery">
{{my_gallery}}
<li>
<img src="{url}" alt="{alt}">
<span>{caption}</span>
</li>
{{/my_gallery}}
</ul>
블록
이 플러그인은 1개의 블록을 제공합니다.
- AgilePress Content Block for ACF Display Advanced Custom Fields content using custom tags within HTML.
설치
- Install and activate Advanced Custom Fields.
- Install “AgilePress Content Block for ACF”.
- Add the block to any post or page.
- Enter your HTML and ACF tags in the sidebar settings.
FAQ
-
How do I display simple ACF fields?
-
Wrap the field name in curly braces:
{title}or{price}. -
How do I access Group fields?
-
Use a colon to separate the group and sub-field:
{location:city}. -
How do I loop through Repeaters or Galleries?
-
Use double curly braces to open and close the loop. Inside, use single braces for sub-fields.
{{team_members}} <h3>{name}</h3> <p>{position}</p> {{/team_members}} -
Does it work with ACF PRO?
-
Yes, it works seamlessly with both the Free and PRO versions (including Gallery and Repeater fields).
후기
이 플러그인에 대한 평가가 없습니다.
기여자 & 개발자
자국어로 “AgilePress Content Block for ACF”(을)를 번역하세요.
개발에 관심이 있으십니까?
변경이력
1.0.0
- Initial release.
