Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1091081

    Hi Guys,

    Disable Masonry Portfolio Links

    I have two Masonry Portfolios on my website.
    I’d like to deactivate the ability to click on the image on both.
    BUT it should keep the hover effect.

    I found the following threads but unfortunately, nothing worked:
    1. https://kriesi.at/support/topic/portfolio-masonry-remove-link/
    2. https://kriesi.at/support/topic/remove-link-on-portfolio-grid/
    3. https://kriesi.at/support/topic/turning-off-link-titles-on-masonry-portfolio/

    I provided you an admin account in the private content.
    Let me know what you did, so I won’t have to bother you in the future :)

    • This topic was modified 5 years, 7 months ago by FloakaEditor. Reason: strange formatting
    #1091342

    Hey FloakaEditor,

    Please try the following in Quick CSS under Enfold->General Styling:

    .home a.av-masonry-entry {
      pointer-events:none;
    }

    Best regards,
    Rikard

    #1092347

    Hi Rikard,

    thank you for your answer.
    Unfortunately, this did not do the trick.
    I tried to add an !important but this did not have any effect either.

    Best,
    Florian

    #1092586

    Hi,

    It’s working on the home page, did you check that? You can extend the code to apply to the portfolio page as well:

    .home a.av-masonry-entry, .page-id-20 a.av-masonry-entry {
      pointer-events:none;
    }

    Best regards,
    Rikard

    #1092687

    Hi Rikard,

    yeah, it does work on the front page now. GREAT!

    However, with this solution, you lose the hover-effect which I wanted to maintain.

    Best

    • This reply was modified 5 years, 7 months ago by FloakaEditor.
    #1092909

    Hi FloakaEditor,

    I have commented out Rikard’s code and added this at the bottom of your functions.php file:

    function remove_link_redirect(){
      ?>
      <script>
        (function($){
          $(document).ready(function(){
            $('#top.home .av-masonry-entry').click(function(event){
              event.preventDefault();
            });
          });
        })(jQuery);
      </script>
      <?php
    }
    add_action('wp_footer', 'remove_link_redirect');

    Let us know if you need further assistance.

    Best regards,
    Nikko

    #1141847

    Thanks Nikko,

    that works great!

    Tobias

    #1141874

    Hey Tobias,

    I’m glad the solution was able to solve your problem.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.