Skip to content

Instantly share code, notes, and snippets.

@jonschr
Last active February 1, 2019 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonschr/224d56a40c9f7e5931355a65018e1b44 to your computer and use it in GitHub Desktop.
Save jonschr/224d56a40c9f7e5931355a65018e1b44 to your computer and use it in GitHub Desktop.
Pulling in video URLs from an ACF addon plugin
//* Get the background image information (if the video is local)
$video_mp4 = wp_get_attachment_url( get_post_meta( $id, $context_prefix . $count . '_video_mp4', true ) );
$video_webm = wp_get_attachment_url( get_post_meta( $id, $context_prefix . $count . '_video_webm', true ) );
$image_fallback = wp_get_attachment_url( get_post_meta( $id, $context_prefix . $count . '_image_fallback', true ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment