Answer the question
In order to leave comments, you need to log in
How to use Advanced Custom Fields to display posts of a certain category on the product page?
I want to implement, on the page, the ability to display records of the category recipes, I use ACF
<?php $recipes = get_field( 'recipes' ); ?>
<?php if ( $recipes ) : ?>
<?php foreach ( $recipes as $post ) : ?>
<?php setup_postdata ( $post ); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endforeach; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question