Created
March 24, 2022 06:49
-
-
Save carlaizumibamford/c857abe07cfa76625226a7ded4d74820 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get attachments that are gif images: | |
Get gif images and remember that by default the attachment’s post_status is set to inherit. | |
$args = array( | |
'post_type' => 'attachment', | |
'post_status' => 'inherit', | |
'post_mime_type' => 'image/gif', | |
); | |
$query = new WP_Query( $args ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment