Created
March 5, 2018 22:27
-
-
Save CatEntangler/1e44bfdadaa4c198c6d25096542ecbd4 to your computer and use it in GitHub Desktop.
Get the attached media to a post minus the featured image
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
function GetAttachedMediaMinusFeaturedImage( INT $postId ) { | |
$featuredImage = get_post_thumbnail_id( $postId ); | |
$attached_media = get_attached_media( NULL, $postId ); | |
unset( $attached_media[ $featuredImage ] ); | |
return $attached_media; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment