Support » Plugin: Gallery to Slideshow » [Plugin: Gallery to Slideshow] How to put the gallery in the single.php??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt


    Hi albertrubis17,

    The gallery should work on single pages and posts or any other regular content that has the [gallery] shortcode. If you would like however to insert in some other placeyou could hook up to the mv_gallery_to_slideshow_has_gallery and return true on any page you want.

    Kind Regards!



    Hi Matt,

    I’m relatively new to WordPress and the idea of plugins and hooks. I want to follow-up on your answer to the above question. I have a post-type of project, and I want the gallery to always show up on the project pages without the user having to add [gallery] manually. I’m starting to get somewhere from your answer and reading the WP codex but I’m still stuck.

    Would I add something regarding “mv_gallery_to_slideshow_has_gallery” to the functions.php page and then a modified <?php add_action( $tag, $function_to_add, $priority, $accepted_args ); ?> to the single-project.php where I want the gallery to show up? Sorry that I have to ask for a more detailed answer than you gave above.

    Thanks Matt! I really like your plugin, it’s really clean and easy to understand and modify to suit my needs.

    I figured out how to do it. It was pretty simple, and Matt had given the answer before.

    <?php echo do_shortcode('[gallery]'); ?>
    in single-*post-type*.php includes the gallery in the template.

    and adding:

    function my_gallery_to_slideshow_has_gallery( $params ){
        return true;
    add_filter( 'mv_gallery_to_slideshow_has_gallery', 'my_gallery_to_slideshow_has_gallery' );

    to functions.php makes it show as the gallery-to-slideshow

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Gallery to Slideshow] How to put the gallery in the single.php??’ is closed to new replies.