A
A
Artyom Parin2021-07-04 12:24:09
PHP
Artyom Parin, 2021-07-04 12:24:09

ACF fields are not displayed after output via WP_Query how to fix?

60e1803887552347645447.png

All requests like <?php the_field('portfolio_title'); ?> are simply not output further.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Gorbunov, 2021-07-04
@Pryger

After endwhile(); add function wp_reset_postdata(); which will reset the $post global variable to its original state.
endwhile(); wp_reset_postdata();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question