
Adds useful functions for rendering image fields, link fields, repeater fields and flexible content for the Advanced Custom Fields plugin. For detailed info look on Bitbucket.
Usage
Returns the snippet of a specific link field.
<?php acf_snippet_get_link($selector, [$postId], [$args]); ?>
Displays the snippet of a specific link field.
<?php acf_snippet_the_link($selector, [$postId], [$args]); ?>
Parameters
$selector (string) (Required) ACF field name or ACF field key. Based on ACF get_field function.
$postId (integer|bool) (Optional) The post ID where the value is saved. Use true for getting sub field. Default value: false (current post).
$args (array) (Optional) Array of link output arguments. Default value: null.
‘class’ (string) class attribute of the anchor.
‘id’ (string) id attribute of the anchor.
‘title’ (string) title attribute text of the anchor.
Returns the snippet of a specific image field.
<?php acf_snippet_get_image($selector, [$postId], [$args]); ?>
Displays the snippet of a specific image field.
<?php acf_snippet_the_image($selector, [$postId], [$args]); ?>
Parameters
$selector (string) (Required) ACF field name or ACF field key. Based on ACF get_field function.
$postId (integer|bool) (Optional) The post ID where the value is saved. Use true for getting sub field. Default value: false (current post).
$args (array) (Optional) Array of image output arguments. Default value: null.
‘size’ (string) Image size to use. Accepts any valid image size. Default value is full.
‘alt’ (string) alt attribute of the image.
‘id’ (string) id attribute of the image.
‘class’ (string) class attribute of the image.
‘title’ (string) title attribute of the image.
‘srcset’ (bool) Use true for retrieving image’s srcset attribute. Default value: false.
‘loading’ (string) loading attribute of the image. Default value: lazy.
‘link’ (bool|array) Array of attributes for anchor wrapped around the image. Default value: false.
‘href’ (string) href attribute of the link.
‘target’ (string) target attribute of the link.
‘class’ (string) class attribute of the link.
‘id’ (string) id attribute of the link.
‘title’ (string) title attribute of the link.
Displays the snippet of a specific repeater field.
<?php acf_snippet_the_repeater($selector, [$postId], [$args]); ?>
Parameters
$selector (string) (Required) ACF field name or ACF field key. Based on ACF get_field function.
$postId (integer|bool) (Optional) The post ID where the value is saved. Default value: false (current post).
$args (array) (Optional) Array of repeater output arguments. Default value: null.
‘template’ (string|array) Template for items inside the loop. Arguments of get_template_part function. In the template use standard get_sub_field function.
‘wrap_before’ (string) Text (HTML) before repeater items while have rows.
‘wrap_after’ (string) Text (HTML) after repeater items while have rows
’empty_html’ (string) Text (HTML) in case there are no rows in repeater.
Displays the snippet of a specific flexible field.
<?php acf_snippet_the_flexible_content($selector, [$postId], [$args]); ?>
Parameters
$selector (string) (Required) ACF field name or ACF field key. Based on ACF get_field function.
$postId (integer|bool) (Optional) The post ID where the value is saved. Default value: false (current post).
$args (array) (Optional) Array of flexible content output arguments. Default value: null.
‘templates’ (array) Array of templates for flexible content layouts. In the templates use standard get_sub_field function.
key (string) – layout name
value (string|array) arguments for get_template_part function.
Requires Advanced Custom Fields (Pro)
Link field
<?php acf_snippet_the_link('more_info_link', false, [ 'class'=> 'link__out', ] ); ?> Image field
<?php echo acf_snippet_get_image('logo', 'option', [ 'size' => 'medium', 'alt' => 'company name', 'title' => false, 'class' => 'header__logo', 'id' => 'company-logo', 'loading' => 'fetch', 'link' => [ 'href' => get_home_url() ] ] ); ?> Repeater field
<?php acf_snippet_the_repeater( 'team_members', false, [ 'template' => [ 'templates/loops/loop', 'team-member' ], 'wrap_before' => '<ul class="about__team">', 'wrap_after' => '</ul>', 'empty_html' => '<p>' . __( 'No team members to show.', 'web' ) . '</p>' ] ); ?>
Flexible content field
<?php acf_snippet_the_flexible_content( 'fp_content', false, [ 'templates' => [ 'slider' => [ 'templates/homepage/snippet', 'slider' ], 'counters' => [ 'templates/homepage/snippet', 'counters' ], 'text_block' => [ 'templates/homepage/snippet', 'text_block' ] ] ] );
?>
`
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
tomekthewo
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Show LinkedIn posts in a live feed that keeps updates current, builds credibility, and helps visitors engage with your brand.
Create interactive infographics with a ratio widget that uses custom icons, dynamic tooltips, and clear visuals to help visitors understand data quickly.
Add WhatsApp Chat to your site to communicate with visitors, deliver instant support, and create a smoother, more trustworthy user experience.
Show trust badges that highlight security and reliability, build customer confidence, and help visitors feel safe making purchases on your site.
Add opening hours to your site to give visitors clear, reliable business information that improves trust, reduces confusion, and supports user experience.
Use wake up notifications to re engage visitors with custom alerts that capture attention, boost interaction, and help increase conversions across your site.
Show products, apps, or designs inside a clean device mockup that improves visualization, builds credibility, and helps visitors make confident decisions.
Add a Pomodoro timer to your site so users can structure focus and break cycles, improving time management and productivity.

Show Blogger posts automatically with a Blogger feed that keeps your content fresh, improves navigation, and helps visitors discover more of your work.
Use a scroll progress bar that visually tracks reading on the page, improves navigation, and keeps visitors aware of their position.
Show live streams and clips with a Twitch feed that keeps content fresh, boosts engagement, and helps visitors follow your channel more easily.
Add an MP3 Player to your website and engage visitors with music, podcasts, and spoken audio without any setup complexity.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
