Home › Forums › Add-ons › Repeater Field › Display repeater from options page › Reply To: Display repeater from options page
Hello Sam, thank you! I created a shortcode using WP Code plugin with the code below:
if(have_rows("gesloten", "option")){
while(have_rows("gesloten", "option")) : the_row();
echo get_sub_field("feestdag");
echo get_sub_field("datum");
echo get_sub_field("eind-datum");
endwhile;
}
?>
1. How can I now display these fields in the manor I suggested?
2. There is one field that may sometimes be empty “eind-datum”. If empty, nothing should be shown. Also the dash in front of that date should not be shown. The output should like something like this:
text-field 12/12/23 – 14/12/23
text-field 16/12/23
text-field 19/12/23 – 22/12/23
text-field 27/12/23
text-field 29/12/23
Thank you!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.