Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #1224397

    I have come across a number of queries about this in the forum, but I wondered whether there was a simpler alternative to css to making a number of images non-clickable? I have a page which has one or two images (out of 30) which needs to be non-clickable and another with 10 images which need to non-clickable. The rest of the site works with clickable images. Many thanks!

    #1224410

    Hey icphillips,

    Add this to quick css:

    .page.page-id-102 .av-masonry-entry{
    pointer-events:none!important;
    }
    
    .page.page-id-2411 .slide-image{
    pointer-events:none!important;
    }

    Best regards,
    Jordan Shannon

    #1224418

    Hi Jordan,

    As indicated in my posting, I was hoping to find a NON-css solution for individual images, but I tried the quick.css soltion you provided. However, it has not changed the images on the page on which I want them to be non-clickable ….

    #1224421

    Hi,

    Unfortunately css is the only way that wouldn’t require hacking of the theme. As for the css not working, did you add to the top of the page of page so it runs first? Also, clear the cache a few times over. The page-id in the css i proved is specifically for the exact pages you pasted links to.

    Best regards,
    Jordan Shannon

    #1224426
    This reply has been marked as private.
    #1224671

    Hi,

    You can target those 2 or three images via css as well. That way the others won’t be clickable. What images are not supposed to be clickable?

    Best regards,
    Jordan Shannon

    #1224700
    This reply has been marked as private.
    #1224703

    Hi,

    Yes, provide admin info so we can help further.

    Best regards,
    Jordan Shannon

    #1224704

    Hi,

    Be sure to add the credentials to the private area.

    Best regards,
    Jordan Shannon

    #1224710
    This reply has been marked as private.
    #1224718

    i can not reproduce the troubles in question:
    if i have no link on an image – there will be no click event on it.
    Even if i have some other images on the page with lightbox linking the images with no link are not in the gallery view on lightbox:
    https://webers-testseite.de/images-with-no-link/
    Or do you mean in gallery or masonry-galleries?

    #1224723
    This reply has been marked as private.
    #1224944
    This reply has been marked as private.
    #1224958

    if these messages are for me – i can not see it – because i’m Participant as you are an do not see private content area.

    #1225187

    Hi, the private messages are for Jordan, one of the moderators. Thank you for looking into the issue as well. I have in the meantime changed the ARCHIVE page; instead of blog posts, I have created a gallery, and opted for non-clickable images. That’s one problem solved! On the PUBLICATIONS page (blog posts), the majority of the images need to stay clickable, except for 2 or 3 which should not be.

    #1226205

    Hi,
    Sorry for the late reply, Thanks for the link to your site, on your blog page, linked below, I see the middle image is not clickable, which other entry should not be clickable?
    I tried the login you posted but it didn’t work and I received an WordFence “you have been blocked” error. That is ok, because I don’t need to login to write the solution for you, but if it helps I have included my IP address for you to whitelist.
    If it is easier for you to take a screenshot and draw which ones to make not clickable, you can add screenshots by uploading your images to a service such as https://savvyify.com/img/ and pasting the html code, or link given in your post or the Private Content area.

    Best regards,
    Mike

    #1226208

    Hi Mike,

    Good to hear from you! Many thanks for looking into this on my behalf. I have deactivated WordFence Security, so you should be able to log in using the details in the Private Content area. The image which needs to be non-clickable, is the very last one on the page PUBLICATIONS.
    May I be so bold as to ask your advice on the following: if I want to make an image click through immediately to a PDF link (image no. 12 – immediately before the portrait which is already non-clickable and image no. 17 – immediately below no. 12, featuring a group on top of a staircase), is that a simple operation?

    Hope to hear from you soon!

    All the best, Iain

    #1226211

    Hi,
    Thank you, I was able to login. For the last item I added this css to your Enfold Theme Options > General Styling > Quick CSS field

    #top.home #av-masonry-1-item-2081 {
    	pointer-events:none !important;
    }

    To change the links to the two items to their PDF links I wrote this function which I added to your functions.php:

    function custom_pdf_links(){
      ?>
      <script>
      (function($){
    $(window).load(function(){
      $( '#top.home #av-masonry-1' ).each(function() {
      $( this ).find( '#av-masonry-1-item-2538' ).attr('href', 'https://your-domain.org/wp-content/uploads/2019/07/NJB_21102011.pdf');
      $( this ).find( '#av-masonry-1-item-2529' ).attr('href', 'https://your-domain.org/wp-content/uploads/2019/07/AAU-Course-structure.pdf');
      });
      });
      })(jQuery);
      </script>
    <?php
    }
    add_action('wp_footer', 'custom_pdf_links');

    Please clear your browser cache and check.

    Best regards,
    Mike

    #1226213

    Mike, you are an absolute star – huge thanks for this! All working perfectly and my partner, Charlotte (whose website this is) is delighted. Thank you – several times over!!

    #1226228

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘Images non-clickable’ is closed to new replies.