Skip to content

Instantly share code, notes, and snippets.

@claudioweb
Last active July 3, 2017 21:49
Show Gist options
  • Save claudioweb/8c32a67be74ad82b085ccbf4d005e814 to your computer and use it in GitHub Desktop.
Save claudioweb/8c32a67be74ad82b085ccbf4d005e814 to your computer and use it in GitHub Desktop.
trazer e exibindo campo de layout - ACF
<?php
$fields_layout = array(); // irá armazenar os fields do layout
if (have_rows('layout_campo_nome',$post_id)) {
// nome_do_campo tipo layout com o post_id
while (have_rows('layout_campo_nome',$post_id)) {
the_row();
// layout e seus fields
$fields_layout[get_row_layout()] = get_row();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment