Created
March 5, 2014 08:23
-
-
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
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 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