Last active
December 19, 2015 01:48
-
-
Save digisavvy/5878198 to your computer and use it in GitHub Desktop.
This bit of code will generate a slider based on the post ID of the current page. Just drop this code into your template (functions.php, or elsewhere in your theme's files) and then upload files to your post (don't insert the images into the post, just upload them as attachments) and kaboom! Requires the Soliloquy Dynamic Slider Add-on (sold sep…
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; | |
$dg_post_id = $post->ID; | |
if ( function_exists( 'soliloquy_dynamic' ) ) | |
soliloquy_dynamic( | |
array( 'id' => "$dg_post_id" | |
) ); | |
} | |
// The following are just action hooks and could be removed, if you're not hooking into anything specifically. | |
add_action( 'thematic_above_categoryloop', 'add_image_to_content', 2 ); | |
add_action( 'thematic_belowsingletop', 'add_image_to_content', 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment