Skip to content

Instantly share code, notes, and snippets.

@digisavvy
Created March 5, 2014 08:23
Show Gist options
  • Save digisavvy/9363261 to your computer and use it in GitHub Desktop.
Save digisavvy/9363261 to your computer and use it in GitHub Desktop.
Soliloquy Dynamic Slider. Retriever the Current Post ID, exclude an ACF Image ID from Slider
function add_image_to_content() {
global $post;
$imageArray = get_field('project_cover_image'); // Array returned by Advanced Custom Fields
$imageID = $imageArray['id']; // Grab, from the array, the 'alt'
// echo "$imageID";
$dg_post_id = $post->ID;
if ( function_exists( 'soliloquy_dynamic' ) ) soliloquy_dynamic( array( 'id' => "$dg_post_id", 'exclude' => "$imageID" ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment