Last active
July 3, 2017 21:49
-
-
Save claudioweb/8c32a67be74ad82b085ccbf4d005e814 to your computer and use it in GitHub Desktop.
trazer e exibindo campo de layout - ACF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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