Answer the question
In order to leave comments, you need to log in
How to display the first three photos of the Wordpress gallery in the post preview?
In general, the idea is that if there is a gallery (or several) in the post, then the first three pictures will be displayed in the post description. Those. I understand how to write a function for new excerpts. It remains to understand how to "scan" a record for galleries and take the first three pictures from the first gallery and transfer them with the same styles?
Answer the question
In order to leave comments, you need to log in
With the get_post_gallery() or get_post_gallery_images() function .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question