Skip to content
Advertisement

How to display thumbnail image from custom post type in another post type?

I have two custom post types “book” and “author”. I want to display author’s thumbnail in book’s post card.

JavaScript

I think here should be loop inside the loop, but don’t understand how to implement it.

Advertisement

Answer

If you use ACF with Post Object field type, change your <-- author thumbnail --> section with the following code

JavaScript
  • don’t forget to change the field name book_author whit your field name
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement