from album to slideshow

HomeSupportImage Storefrom album to slideshow

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #45403

    gijsb
    Participant

    Is it possible to have the gallery links in an album page link directly to a a slideshow in stead of a photo-page? Perhaps by adding a option to the shortcode for an album, like [image-store slideshow=1]?

    #45406

    jackbloom
    Participant

    try layout=slideshow

    I couldn’t find this well documented but I was able to piece together enough info that I think it might work….

    #45429

    Xpark Media
    Keymaster

    if you are using the shortcode layout=slideshow could work but if you are using the regular gallery pages disable the photo “link” in settings > general “Hide “Photo” link”. This will fort the galleries to go to the slideshow but prevent access to the photo link completely

    #45436

    gijsb
    Participant

    i was not able to force the link to my gallery’s on the album page to show the galleries in slideshow mode with [image-store layout=slideshow]. I also tried this with the checkbox “Hide “Photo” link Hide Photo link from the store navigation” in settings > general on and off. Furthermore I tried to find some php code where the album page is generated, to modify the link to my galleries with the addition of “&imspage=slideshow”. But I was unable to find something like that…

    #45534

    Xpark Media
    Keymaster

    try this, add this code to your functions.php file. It will force every link going to photos to go to the slideshow. Note this code will only work if you are not translating the plugin.

    function change_link_to_slideshow($link, $page ){
      if( $page == 'photos' && is_tax('ims_album') )
        $link = dirname( $link ) . '/slideshow';
      return $link;
    }
    add_filter('ims_permalink', 'change_link_to_slideshow', 10, 2);
    #45606

    gijsb
    Participant

    Thank you Hax,

    You said this has something to do with a translation. What do I have to
    change to make it work in case of the use of a translation (dutch)?

    I added this code into my themes function.php, but there is no change in the way my gallery is showed when I navigate to it trough my album page. The link from the album page to my galleries are not changed.

    Probably you can have a look at my album page:

    http://fotografiemariolmiddel.nl/fotoalbums/onstwedde-17-3-2012/

    Kind regards

    #45607

    gijsb
    Participant

    I tried to alter you suggested code in functions.php with this

    if( $page == ‘fotos’ && is_tax(‘ims_album’) )

    but that didn’t work also…

    #46685

    Xpark Media
    Keymaster

    I know is a very late reply but if you still need the code here it is. If you don’t need it any more hopefully it can help others.

    function change_album_gallery_link( $permalink, $post ){
    	if( empty( $post->post_type ) || $post->post_type != 'ims_gallery' )
    		return $permalink;
    
    	global $wp_rewrite;
    	if( $wp_rewrite->using_permalinks() )
    		return $permalink . "/slideshow/";
    	else  return $permalink . "&imspage=slideshow";
    	
    }add_filter( 'post_type_link', 'change_album_gallery_link', 50, 2 );
    
    #47231

    gijsb
    Participant

    Thank you Hax,

    your solution works, but the links inside an album are also going to /slideshow. Is there some kind of solution to exclude these links from the code you’ve already given?

    kind regards,

    #47247

    Xpark Media
    Keymaster

    copy the updated code from link from album to a different page

    #47386

    gijsb
    Participant

    Thanks Hax, your code works like a charm 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.