Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I figured out how to do it. It was pretty simple, and Matt had given the answer before.

    Including
    <?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

    Maybe this is a silly workaround, and not the cleanest way to remove the thumbnails and change them to blocks. In my theme’s gallery-to-slideshow.css I edited the css for the pager and it works so that they display as little colored squares instead of images.

    .gallery-to-slideshow .pager {
    	display: inline;
    	width: 100%;
    	list-style: none;
    	overflow: hidden;
    }
    .gallery-to-slideshow .pager li {
    	display: inline-block;
    }
    .gallery-to-slideshow .pager li a {
    	background-color: #858585;
    	border: 1px solid #c8cdd3;
    	display: block;
    	height: 10px;
    	width: 10px;
    	margin-right: 2px;
    	overflow: hidden;
    }
    .gallery-to-slideshow .pager li a img {
    	display:none;
    }
    .gallery-to-slideshow .pager li.active a {
    	background-color: #009de0;
    }

    That being said, it’s not a perfect solution because the page is still loading the image thumbnail, it’s just then set to display:none.

    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.

    Thread Starter jdan

    (@jdan)

    I do have a child theme.

    Thanks! That was the problem exactly!

Viewing 4 replies - 1 through 4 (of 4 total)