How to access repeater field of a custom field?

I have a custom post type called donation_group it has a custom_field called donate_pages which is a repeater field. This donate_pages has again fields called donation_object and amount_received. I want to access these custom fields in my controller ie php file.

This is the code I have tried so far

 $  donation_group_posts = Timber::get_posts(array(         'post_type' => 'donation_group'     ));      foreach ( $  donation_group_posts as $  dg_post ) {         $  dg_donate_pages = $  dg_post -> donate_pages;         echo "dg_donate_pages", $  dg_donate_pages;     } 

When I echo dg_donate_pages, I am only getting the number of rows that repeater field has. How can I get its values?

Display all repeater subfield values from DB

Here is the thing – I’m working on a personal project which includes multiple custom fields (created via ACF). Few of them are repeater types.

What I want to achieve is to display 3 arrays/blocks of those repeater subfield values. For better understanding, I have this repeater field: open_workshops, and this field includes subfields: date, location, partnerships.

I want simply to show all values from those subfields stored in DB. Something like:

Open Workshops:

  • Date: Jan 2017, Feb 2017…Dec 2019 etc

  • Location: New York, Warsaw…

  • Partnerships: EY, Google..

What issues I’ve noticed – first of all, because of field type (repeater) it’s damn hard to find those values in the DB. Because its not a single field but ACF replicates their names, so instead of looking for single field: open_workshops_date i need somehow to find: open_workshops_0_date, open_workshops_1_date etc.

My initial code was:

  if( have_rows('open_workshops') ):         while ( have_rows('open_workshops') ) : the_row();             $  sub_value_1 = get_sub_field('date');         $  sub_value_2 = get_sub_field('location');         $  sub_value_3 = get_sub_field('partnerships');             echo '$  sub_value_1'; echo '$  sub_value_2'; echo '$  sub_value_3';          endwhile;     else :         // no rows found     endif; 

I’ve tried as well the suggestion from this post: Retrieving all data from repeater fields

but it shows nothing.

Use modulo condition in ACF repeater Field

I want to make a modulo condition in my ACF Repeater field.

In a while loop, I want my code different if $ j is odd or even.

My code:

<div class="container grow mt-5"> <h1 class="text-center">Expositions</h1>  <?php     $  j = 1;     if( have_rows('expos') ):         while ( have_rows('expos') ) : the_row();         $  titre= get_sub_field('titre');         $  img = get_sub_field('image');         $  contenu = get_sub_field('contenu');          if ($  j%2 == 1) {         echo '           <div class="row mt-5">             <div class="col-4">                 <img class="thumbnail" src="'.echo esc_url($  img['url']);.'" alt="'.esc_attr($  img['alt']);.'" />                 </div>             <div class="col-8">                 <h2 class="text-center">'.$  titre.'</h2>                 <p>'.$  contenu.'</p>             </div>             </div>'     } else {         echo '          <div class="row mt-5">             <div class="col-8">                 <h2 class="text-center">'.$  titre.'</h2>                 <p>'.$  contenu.'</p>             </div>             <div class="col-4">                 <img class="thumbnail" src="'.echo esc_url($  img['url']);.'" alt="'.esc_attr($  img['alt']);.'" />                 </div>               </div>'     };       $  j++;     endwhile;     else :         echo '<p class="text-center">No content !</p>';     endif;     ?>  </div>   

It doesn’t work.

Where is my error ?

Burp Suite – Use \n in repeater

Currently I am trying to fuzz the request I sent to Repeater. However if I put a new line (using Enter key) inside repeater’s text window, burp on background really creates a crlf.

My goal:

Send a request, which contains only a newline without carriage return.

What I tried

I tried to use \n (as it is common in a lot of programming languages). However burp’s Repeater treats \n as set of two characters – \ and n.

burp repeater

Question

Is there any way how to pass standalone newline character without carriage return inside Request stored in Repeater?

So far I tested this using my workaround in bash console, which is not-elegant at all:

curl https://mykey.example.com --header "Content-Length: 1" --header $  '\nTransfer-Encoding: chunked' 

Any insights appreciated.

functionality similar to ACF repeater? User to add points

I have custom post type called “tours” , user adds post called “london tour” as a title . And then i want user to be able to add tour stops, which will be displayed in front end with fontawesome icons , as a stylised list . I don’t want to include full text editor, just some kind of field with ability to add next field.

My only though was to have a simple list in content editor, and to use javascript to stylize ‘li’ items etc.

Pagination on WordPress Repeater has stopped working since upgrade to php7.2 suspect issue with count() function

Since updating to php7.2 the pagination function has stopped working on a gallery built with ACF repeater. I suspect it’s an issue with the count() function

I’ve found some articles relating to this but can’t work out how to update my code to resolve the problem. If anyone could help, I’d be super grateful.

My Code below

<?php /*   * Paginate Advanced Custom Field repeater  */  if( get_query_var('page') ) {   $  page = get_query_var( 'page' ); } else {   $  page = 1; }  // Variables $  row              = 0; $  images_per_page  = 15; // How many images to display on each page $  images           = get_sub_field( 'main_gallery_images' ); $  total            = count( $  images ); $  pages            = ceil( $  total / $  images_per_page ); $  min              = ( ( $  page * $  images_per_page ) - $  images_per_page ) + 1; $  max              = ( $  min + $  images_per_page ) - 1;  // ACF Loop if( have_rows( 'main_gallery_images' ) ) : ?>     <div id="gallery" class="main">   <?php while( have_rows( 'main_gallery_images' ) ): the_row();      $  row++;      // Ignore this image if $  row is lower than $  min     if($  row < $  min) { continue; }      // Stop loop completely if $  row is higher than $  max     if($  row > $  max) { break; } ?>                           <?php        $  image = get_sub_field( 'image' );        $  caption = get_sub_field('caption');     ?>     <div class="galleryItem">         <a href="javascript:void(0)" class="enlarge">             <div class="image" style="background-image: url(<?php echo $  image; ?>)">             <span><?php echo $  caption; ?><em>CLOSE X</em></span>             </div>         </a>     </div>   <?php endwhile; ?>     </div> <div class="galPag"> <?php // Pagination   echo paginate_links( array(     'base' => get_permalink() . '%#%' . '/#gallery',     'format' => '?page=%#%',     'current' => $  page,     'total' => $  pages   ) );   ?> </div> <?php endif; ?> 

Site is here: https://kalmkitchen.co.uk/gallery/

What should happen is that the pagination links update the url and display the next set of images. What is happening is that the url gets updated but you just get the first set of images displayed again. The ‘next’ link doesn’t update and is always pointing to page2.

Configuring old router as repeater?

I have been at it for about two days and let me give a detailed account of all the settings that I have set.

For the sake of clarity I will call the router which as Internet connection (WAN) as the mainRouter and the old router which I want to use as a repeater as the the secondRouter.

In the screenshots I have the SSID of the mainRouter as iball100 and that of the secondRouter as iballRep

Here are the settings for the mainRouter

Main router settings

And now for the Settings for the secondRouer

enter image description here

The problem that i have is that the secondRouter does not have access to the internet. When I connect to the secondRouter it says “connected,No internet”. I have tried connecting to it using my phone as well still get the same thing.

The secondRouter doesn’t show as a connected client on the mainRouter, is a thing that I observed.

I have no clue as to what am I missing here. The settings that I have work well for youtube videos which I saw, link here.

Any help in this regard will be appreciated.