Make portfolio images clickable

Home Forums WordPress Theme Inshot – Photography WordPress Theme Make portfolio images clickable

This topic contains 6 replies, has 2 voices, and was last updated by  CTHthemes 1 week, 6 days ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27163

    tolucophoto
    Participant

    Supported

    Hi.
    I’m using the Fullwidth portfolio and I’d like to make the image clickable as a link, rather than the image’s title.
    I’d also like to hide the title text.

    Is this possible?

    Thanks

    #27164

    tolucophoto
    Participant

    Supported

    I worked out how to remove the title text using this, but obviously this means you can’t click anything to enter the portfolio:

    .thumb-info {
      display: none !important;
    }

    I found another support post that offers this code for the scripts.js file, but your screenshot doesn’t show up, and when I add it where I think it needs to go, it doesn’t work.

    $(".swiper-slide.portfolio img").on("click", function(e) {
                e.preventDefault();
                var a = $(this).parent().find('.thumb-info h3 a').attr("href");
                window.location.href = a;
                
            });

    Cheers

    #27177

    CTHthemes
    Keymaster

    Because you used this code:

    
    .thumb-info {
      display: none !important;
    }
    

    Please use this instead:

    
    .thumb-info {
      opacity: 0;
    }
    
    #27197

    tolucophoto
    Participant

    Supported

    That works fine, but I’d still like the whole image to be the clickable link, not just the text.

    What code do I need to add? And where? I’m using the Fullwidth portfolio.

    Thanks

    • This reply was modified 2 weeks ago by  tolucophoto.
    #27211

    CTHthemes
    Keymaster

    Here it is:

    .thumb-info {
      top: 0;
      opacity: 0;
    }
    #27222

    tolucophoto
    Participant

    Supported

    This just moves the hidden text to the top left? It doesn’t make the whole image a clickable link.

    When anybody uses the site they try to click on the image and nothing happens. It’s especially annoying on a mobile.

    You answered the same question in this post with a JS code, but it didn’t work when I tried it.

    #27233

    CTHthemes
    Keymaster

    Try this

    
    .thumb-info { 
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      opacity: 0;
    }
    
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Hello! CityBook version 1.2.7 was released. Bulk Import Add-On, OpenStreetMapView Details
+