Bring Your Business to Life › Support › Image Store › from album to slideshow
Tagged: slideshow link in album
- AuthorPosts
- March 15, 2012 at 6:47 am #45403gijsbParticipant
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]?
March 15, 2012 at 1:33 pm #45406jackbloomParticipanttry layout=slideshow
I couldn’t find this well documented but I was able to piece together enough info that I think it might work….
March 15, 2012 at 10:38 pm #45429Xpark MediaKeymasterif 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
March 16, 2012 at 11:21 am #45436gijsbParticipanti 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…
March 19, 2012 at 9:21 pm #45534Xpark MediaKeymastertry 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);
March 22, 2012 at 1:51 am #45606gijsbParticipantThank 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
March 22, 2012 at 1:54 am #45607gijsbParticipantI tried to alter you suggested code in functions.php with this
if( $page == ‘fotos’ && is_tax(‘ims_album’) )
but that didn’t work also…
April 30, 2012 at 10:54 pm #46685Xpark MediaKeymasterI 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 );
May 22, 2012 at 10:52 am #47231gijsbParticipantThank 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,
May 23, 2012 at 2:02 am #47247Xpark MediaKeymastercopy the updated code from link from album to a different page
May 28, 2012 at 1:07 am #47386gijsbParticipantThanks Hax, your code works like a charm 🙂
- AuthorPosts
- You must be logged in to reply to this topic.