link home block titel to slideshow
Support Area › Forums › Selfie › link home block titel to slideshow
Tagged: home block, links, slideshow, titels
- This topic has 12 replies, 2 voices, and was last updated 9 years, 7 months ago by Bill Robbins.
-
AuthorPosts
-
August 21, 2014 at 06:17 #21757vilhelm stokstadParticipant
Hi!
Im still working on a way to get the titles to link to the galleries. But it seems like it always shows the first image twice which is very annoying. I have been trying to do something like
recommended in this post: https://support.organizedthemes.com/forums/topic/link-title-to-the-gallery/
but i can’t get it to work. the linked images now shows up twice and without captions… This would be a really great feature for the theme, as it is much more intuitive than the “+” sign, which on some images are barely visible.What do you think? is it possible to get it to work properly?
Thanks again
August 21, 2014 at 06:18 #21758vilhelm stokstadParticipantTo be clear. I just want the text to do the exakt same thing as the “+” sign.
August 21, 2014 at 09:25 #21772Bill RobbinsModeratorVilhelm,
Good question. The gallery script will pull together all the images that share a common “rel” attribute in the link. Since the + sign already has one, if you add another link to the same image, it’ll duplicate it in the gallery.
One option would be to make the link point to a different image. You can get the URL to any image out of your media library. Just click on the edit link for an image and look on the right hand side. The file URL will be listed there.
Use the url to a different image from any of the ones that are already in your gallery or the hero and that should give you unique images there. You can even add a caption to that image by editing the code this way:
<h2><a title="Your Caption" rel="swipe-group-id" href="http://yoursite.com/image.jpg" class="swipebox pop-open">Your Title</a></h2>
and replacing the
Your Caption
with the caption you’d like to display.Let me know if that doesn’t do the trick for you.
Have a great day,
BillAugust 22, 2014 at 10:09 #21817vilhelm stokstadParticipantHi Bill!
Thanks, but this doesn’t seem to work, it actually shows the linked image three times now instead.I tired linking do different images, but the result is always that that images just shows up before the full slide. if i remove the image from the slide, then fine, it only shows once, but then it will not show at all when using the “+”-sign instead…
Is it possible to link to something else thats not an image? What exactly does the “+”-sign link to?
Thanks again
August 22, 2014 at 10:12 #21818Bill RobbinsModeratorThe lightbox pulls together all links to images that share a common “rel” attribute. Is there any way you can let me see a home block that you’re setting up this way? That would help me help you out the most.
Thanks,
BillAugust 22, 2014 at 10:16 #21820vilhelm stokstadParticipantThis is the block I’m testing on right now: http://www.vilhelmstokstad.com/block/voluntourism-2/
Linking to the hero images is at the moment the least confusing way, and as i understand the same target as the plus-sign links to. but it does show up twice and that really gets people off when looking at the slide. i also noticed when testing on friends and family that they almost always tries to click on the text before the plus, so it would be really good to get this to work.
August 22, 2014 at 10:19 #21821vilhelm stokstadParticipantMaybe if i remove the plus-sign entirely this will then work? Although i really like to have the plus-sign as well…..
August 22, 2014 at 10:29 #21822Bill RobbinsModeratorThanks for sending over the link. It looks like the text link is set to use the same image that the plus sign uses (the Hero Image). What you’ll want to do is have it use an image that isn’t the hero image and isn’t in the gallery. You could remove an image out of the gallery and then use it to prevent duplicates.
Here’s what that looks like: https://support.organizedthemes.com/samples/selfie/sample.html
See how that goes.
August 22, 2014 at 10:44 #21823vilhelm stokstadParticipantHi, Yeah i tried that, but then the text link and the plus sign shows the slide differently…
There will be an image if you use the text, but that image won’t be visible at all if you use the plus sign… Also it looks a lot better if the hero image is the first image of the slide…Thanks
August 22, 2014 at 11:30 #21825Bill RobbinsModeratorVilhelm,
I’m not aware of a way to have both text and the plus sign open up the same image without it being duplicated. There has to be a link to an image to open up the slideshow. If you link to the same image twice, it’ll display twice. I don’t think there’s a way around that. If you always want to start with the hero image, then you’ll need to only use the + sign or delete the sign and use a text link to that image. Here’s how to delete the plus sign:
- Go to the Appearance section in your WordPress dashboard and choose Edit.
- From the list of files on your right, choose page-home-template.php
- Delete this line:
<a rel="swipe-group-<?php the_ID(); ?>" title="<?php the_title(); ?>" href="<?php echo wp_get_attachment_url( get_post_meta($post->ID, "portfolio_hero", true) ); ?>" class="swipebox pop-open"></a>
- Save your changes and repeat that for single-home-block.php and taxonomy-portfolio-group.php
Sorry there isn’t a option for both the text and plus sign to open the hero image and have it not duplicated.
Bill
August 22, 2014 at 13:14 #21831vilhelm stokstadParticipantHi Bill!
This actually seems to do the trick, although there is some weird stuff going on if you do it wrong.
So, if i link only one word, with no formatting, it works, and it seems to trigger the plus sign as well! hurray!.. like this:
Voluntourism
Travel to do good or do good to travel?But if i write the code like this:
<h1>Voluntourism</h1>
Travel to do good or do good to travel?with one h1 inside of the link tags, then it trigger the image three times!
well, now its only a matter of formatting the text as i want, without triggering the images too much. This will work very good i think. Thank you for patience and help…
August 22, 2014 at 13:26 #21834vilhelm stokstadParticipantAlso the [animate right] shortcode seems to mess up the placement of the plus sign. so i remove it and then it seems to work.
August 22, 2014 at 15:10 #21843Bill RobbinsModeratorI’m glad you found a solution that works for you. Have a great weekend and let me know if you need anything else.
-
AuthorPosts
- The topic ‘link home block titel to slideshow’ is closed to new replies.