Tagged: links
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
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
Thank you. Works like a charm.
You can close this ticket.
Regards
Nina
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