M
M
Mixa2015-01-02 15:03:17
Parsing
Mixa, 2015-01-02 15:03:17

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

1 answer(s)
S
Sergey Biryukov, 2015-01-09
@flash_usb

With the get_post_gallery() or get_post_gallery_images() function .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question