link home block titel to slideshow

Support Area Forums Selfie link home block titel to slideshow

Viewing 13 posts - 1 through 13 (of 13 total)
URL to the page in question: http://www.vilhelmstokstad.com
  • Author
    Posts
  • #21757
    vilhelm stokstad
    Participant

    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

    #21758
    vilhelm stokstad
    Participant

    To be clear. I just want the text to do the exakt same thing as the “+” sign.

    #21772
    Bill Robbins
    Moderator

    Vilhelm,

    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,
    Bill

    #21817
    vilhelm stokstad
    Participant

    Hi 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

    #21818
    Bill Robbins
    Moderator

    The 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,
    Bill

    #21820
    vilhelm stokstad
    Participant

    This 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.

    #21821
    vilhelm stokstad
    Participant

    Maybe if i remove the plus-sign entirely this will then work? Although i really like to have the plus-sign as well…..

    #21822
    Bill Robbins
    Moderator

    Thanks 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.

    #21823
    vilhelm stokstad
    Participant

    Hi, 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

    #21825
    Bill Robbins
    Moderator

    Vilhelm,

    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:

    1. Go to the Appearance section in your WordPress dashboard and choose Edit.
    2. From the list of files on your right, choose page-home-template.php
    3. 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>
      
    4. 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

    #21831
    vilhelm stokstad
    Participant

    Hi 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…

    #21834
    vilhelm stokstad
    Participant

    Also the [animate right] shortcode seems to mess up the placement of the plus sign. so i remove it and then it seems to work.

    #21843
    Bill Robbins
    Moderator

    I’m glad you found a solution that works for you. Have a great weekend and let me know if you need anything else.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘link home block titel to slideshow’ is closed to new replies.