See here http://thriveweb.com.au/the-lab/wordpress-gallery-plugin-photospace-2/
Template tag
If you want to hard code this gallery into a page template you can do so with this code.
<?php echo do_shortcode(‘[gallery]‘); ?>
That wasn’t quite what I was trying to achieve but I figured out how to get what I wanted. Here is what I did as an example in case someone else needs to do this.
To correctly modify the gallery shortcode wordpress suggest to hook into the post gallery filter, instead of simply ovveriding with add_shortcode(‘gallery’). You can see that here http://codex.wordpress.org/Plugin_API/Filter_Reference/post_gallery
I modified the code by commenting out the add_shortcode(‘gallery’) function and adding in the example from the link above and return an empty string on my specific conditional. This can be used by anyone in the future if they would like to use photospace in certain areas of the site but the default gallery on others.
/* add_shortcode( 'gallery', 'photospace_responsive_shortcode' ); */
function ddc_gallery_shortcode( $output = '', $atts, $content = false, $tag = false ) {
$return = $output; // fallback
global $post;
if( 'client-viewing' == $post->post_type ) {
return $return;
};
// retrieve content of your own gallery function
$my_result = photospace_responsive_shortcode( $atts );
// boolean false = empty, see http://php.net/empty
if( !empty( $my_result ) ) {
$return = $my_result;
}
return $return;
}
add_filter( 'post_gallery', 'ddc_gallery_shortcode', 10, 4 );
the only other thing modified is setting the $my_result variable equal to the photospace gallery function.