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.

Website/ Profile URL:

https://binformatica.pt/

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

Unverified

0

Elementor-Show-on-Click

Added: 3 months ago

Last Updated: 3 months ago

Show another container when you click on an Icon.

Elementor

AI Verified

0

Elementor Repeater Field No Bullets

Added: 3 months ago

Last Updated: 3 months ago

Elementor

Unverified

0

Croccoblocks Megamenu overflow issue for full screen on mobile/tablet

Added: 3 months ago

Last Updated: 3 months ago

This simple bit of CSS Code solves the frustrating issue of overflow (sideways scrolling) for mobile devices on the Croccoblocks mega menu when it is set to full-screen.

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: 1 year ago

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

General

AI Verified

0

Drag-and-Drop Sorting CPT

Added: 4 months ago

Last Updated: 4 months ago

Draggable sorting for custom post types order by menu order

Elementor

Unverified

0

Elementor Pro Form Checkboxes

Added: 4 months ago

Last Updated: 4 months ago

Style Elementor Pro Form Checkboxes with CSS