C
C
chelnokov_a2020-05-11 18:58:06
WordPress
chelnokov_a, 2020-05-11 18:58:06

How to display a preview of a custom WP post in the product card?

Good afternoon. There is a custom post type "Reviews". I need to display 3 reviews in the product card. Which I can choose when creating a product from the list of added entries (reviews). Please tell me how to implement this. I would be very grateful for help. Thank you.

At the current stage. Through acf, I made a field for the product through which I can choose which records will be attached to this field. Through the <?php echo get_field('otzivi') ?> function,
I output to the page.

The word Array is displayed on the page. How to work further from this. Do you need a cycle?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2020-05-11
@Chefranov

ACF and it has Relationship fields, and then just a loop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question