Descrição
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>
Blocos
Este plugin inclui 1 bloco.
- AgilePress Content Block for ACF Display Advanced Custom Fields content using custom tags within HTML.
Instalação
- 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.
Perguntas frequentes
-
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).
Avaliações
Este plugin não tem avaliações.
Contribuidores e programadores
“AgilePress Content Block for ACF” é software de código aberto. As seguintes pessoas contribuíram para este plugin:
ContribuidoresTraduza o “AgilePress Content Block for ACF” para o seu idioma.
Interessado no desenvolvimento?
Consulte o código, consulte o repositório SVN, ou subscreva o registo de alterações por RSS.
Registo de alterações
1.0.0
- Initial release.
