AI Verified

Name

Display ACF repeater field

About

Allows to display Advanced Custom Fields Pro Repeaters whitout a plugin or page builder that allow ACF fields.

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

To display this repeater in Elementor, use the shortcode widget, and enter: [show-required] It can also be used anywhere else shortcodes are allowed. 'show-required' = shortcode name 'required_posting' = id of repeater 'section_title' = id of fieldname inside repeater (Code is not mine, I found it but there was no author mentioned)

Codevault

B Informatica

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: Not Specified

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

14/11/2022

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Display ACF repeater field

 
                    
1/* shortcode for displaying required posting repeater field from ACF*/
2 
3add_shortcode ('show-required', 'dnlt_show_required');
4 function dnlt_show_required() {
5 $pageID = get_the_ID(); // not required if within loop, but doesn't hurt
6 $content= '';
7 if( have_rows('required_posting', $pageID) ) {
8 $content .= '<ul>';
9 while( have_rows('required_posting', $pageID) ) {
10 the_row();
11 $content .= '<li>' . get_sub_field('section_title') . '</li>';
12 }
13 $content .= '</ul>';
14 }
15 return $content;
16}

0

Related Snippets

Please see some snippets below related to this snippet..

Elementor

AI Verified

1

PHP: Remove image sizes (controls) from Elementor image dropdowns

Added: 1 week ago

Last Updated: 1 week ago

<p>Since we disable the generation of images besides the original upload, the Elementor controls aren't relevant. This doesn't disable controls on all widgets, unfortunately — but it does remove them...

Elementor

Unverified

0

Swap between multiple images on image hover

Added: 1 year ago

Last Updated: 1 year ago

Elementor

AI Verified

3

Elementor Scroll Sticky Header

Added: 3 months ago

Last Updated: 9 hours ago

Want the Sticky Header to disappear after scrolling down 100px, and then to reappear as soon as you scroll up?

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Elementor

AI Verified

0

Display ACF repeater field

Added: 1 year ago

Last Updated: 10 months ago

Allows to display Advanced Custom Fields Pro Repeaters whitout a plugin or page builder that allow ACF fields.