Support » Plugin: Gallery to Slideshow » [Plugin: Gallery to Slideshow] How do I display Images as full width?

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

    (@sksmatt)

    Hi Andy,

    Any chance you can show us a link?

    Kind Regards!

    Hi Matt,

    It’s only local at the moment but I’ll upload it to a test site.

    Ok, I’ve put it on http://www.barbikyoo.com

    If you right click to view the image it comes up full size??
    Please let me know what you think

    Plugin Author Matt

    (@sksmatt)

    Hi Andy,

    Thanks for the link. You can either modify that option via the shortcode attribute “size” like this:

    [gallery size="full"]

    Or, better yet, via this little snippet that you have to paste in your theme’s functions.php file:

    function yourprefix_theme_setup(){
        add_action('mv_gallery_to_slideshow_attr', 'yourprefix_gallery_to_slideshow_attrs');
    }
    add_action('after_theme_setup','yourprefix_theme_setup');
    
    function yourprefix_gallery_to_slideshow_attrs( $attr ) {
        $attr['size'] = 'full'; // or any other registered size
        return $attr;
    }

    Kind Regards!

    linds

    (@lsterling03)

    Hello – I’m trying to do something similar – I’ve registered an image size “slider” in my functions file. I tried adding the above code and it’s not working. I think it’s because I’m supposed to change “yourprefix”, which appears to be “pp” based on what I’ve seen in front of some of other things. But I’m not sure?

    It works if I manually add it to the short code with size=”slider” – but I don’t want to have to do that every time.

    Here is the code I’m using in my functions.php file:

    if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'slider', 616, 240, true );
    	add_image_size( 'blog', 410, 9999 );
    }
    
    function pp_theme_setup(){
        add_action('mv_gallery_to_slideshow_attr', 'pp_gallery_to_slideshow_attrs');
    }
    add_action('after_theme_setup','pp_theme_setup');
    
    function pp_gallery_to_slideshow_attrs( $attr ) {
        $attr['size'] = 'slider'; // or any other registered size
        return $attr;
    }

    Thank you!

    Plugin Author Matt

    (@sksmatt)

    Hi lsterling03,

    Looks good. Try hooking the pp_theme_setup function on the init hook rather than the after_theme_setup.

    Kind Regards!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Gallery to Slideshow] How do I display Images as full width?’ is closed to new replies.