Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1451869

    Hi

    I have a page that displays all the blogposts in order and in three columns. Like a gallery.
    Both the image and the text below the image have links to the same post.
    For accessibility purposes, this is redundant and screen readers get read the link twice.
    Is there a way to remove the link, either from the image or from the text?

    Regards
    Nina

    #1451890

    Hey Advantage09,
    Thank you for the link to your site, Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_remove_link_from_slide_image_script() { ?>
      <script>
    (function($){
    $('.page-id-1046 .slide-entry a.slide-image').removeAttr('href');
    })(jQuery);
    </script>
      <?php
    }
    add_action( 'wp_footer', 'custom_remove_link_from_slide_image_script', 99 );

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1451955

    Thank you. Works like a charm.

    You can close this ticket.

    Regards
    Nina

    #1451960

    Hi,

    Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘removing links’ is closed to new replies.