Have rows (ACF)
Versie door Jeroen Strompf (overleg | bijdragen) op 29 jul 2022 om 13:59 (Nieuwe pagina aangemaakt met 'The function <code>have_rows</code> checks to see if a parent field (such as Repeater or Flexible Content) has any rows of data to loop over. This is a boolean func...')
The function have_rows
checks to see if a parent field (such as Repeater or Flexible Content) has any rows of data to loop over. This is a boolean function, meaning it returns either true or false.
This function is intended to be used in conjunction with the_row()
to step through available values.
Using have_rows()
together with the_row()
is intended to feel native much like the have_posts()
and the_post()
WordPress functions.
Syntaxis
have_rows( $selector, [$post_id = false] ); as boolean - True if row exists
$selector
(string, required): Veldnaam of veldsleutel$post_id
(mixed, optional): Post-ID. Voor items op pagina Options, moet ditoption
zijn.