{"id":1966450,"date":"2025-08-15T11:39:35","date_gmt":"2025-08-15T15:39:35","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1966450"},"modified":"2025-08-15T12:18:46","modified_gmt":"2025-08-15T16:18:46","slug":"make-featured-images-link-to-single-event-pages","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/make-featured-images-link-to-single-event-pages\/","title":{"rendered":"Make Featured Images Link to Single Event Pages"},"content":{"rendered":"\n<p>In one of our recent plugin versions, we introduced a change where the featured images in views such as List and Month Views no longer link to the single event page. This was an intentional change aimed at improving accessibility (A11Y) for users who rely on screen readers or keyboard navigation.<\/p>\n\n\n\n<p>When both the event image and the title link to the same page, it creates what&#8217;s known as redundant links, which can confuse assistive technologies. According to accessibility standards like WCAG 2.1 (specifically criteria 2.4.4 and 1.1.1), redundant or ambiguous links can make it harder for users with visual or cognitive impairments to understand and navigate your content effectively.<\/p>\n\n\n\n<p>That said, we completely understand that this change may affect how your site\u2019s visitors interact with event listings, especially those who are used to clicking or tapping on the image.<\/p>\n\n\n\n<p>If you would like to bring back this functionality, here is an easy way to bring back the featured image link without needing to copy or create template files manually.<\/p>\n\n\n\n<p>Add the PHP snippets below to your theme\u2019s&nbsp;<code>functions.php<\/code>&nbsp;file or use the&nbsp;<strong><a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Code Snippets<\/a>&nbsp;<\/strong>plugin.<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>For the List View<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add_filter( 'tribe_template_html:events\/v2\/list\/event\/featured-image', function ( $html, $file, $name, $template ) {\n\t$event = $template-&gt;get( 'event' );\n\n\t\/\/ Build anchor output\n\t$anchor_open = sprintf(\n\t\t'&lt;a href=\"%s\" title=\"%s\" rel=\"bookmark\" class=\"tribe-events-calendar-list__event-featured-image-link\" tabindex=\"-1\" aria-hidden=\"true\"&gt;',\n\t\tesc_url( $event-&gt;permalink ),\n\t\tesc_attr( $event-&gt;title )\n\t);\n\n\t\/\/ Wrap img with anchor\n\t$html = preg_replace(\n\t\t'\/(&lt;img[^&gt;]*&gt;)\/',\n\t\t$anchor_open . '$1&lt;\/a&gt;',\n\t\t$html\n\t);\n\n\treturn $html;\n}, 10, 4 );<\/pre>\n\n\n\n<p class=\"has-large-font-size\"><strong>For the Month View<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add_filter(<br>'tribe_template_html:events\/v2\/month\/calendar-body\/day\/calendar-events\/calendar-event\/tooltip\/featured-image',<br>function ( $html, $file, $name, $template ) {<br><br>    $event = $template->get( 'event' );<br><br>    \/\/ Build anchor output<br>    $anchor_open = sprintf(<br>        '&lt;a href=\"%s\" title=\"%s\" rel=\"bookmark\" class=\"tribe-events-calendar-month__calendar-event-tooltip-featured-image-link\" tabindex=\"-1\" aria-hidden=\"true\">',<br>        esc_url( $event->permalink ),<br>        esc_attr( $event->title )<br>    );<br><br>    \/\/ Wrap img with anchor<br>    $html = preg_replace(<br>        '\/(&lt;img[^>]*>)\/',<br>        $anchor_open . '$1&lt;\/a>',<br>        $html<br>    );<br><br>    return $html;<br>}, 10, 4 );<br><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In one of our recent plugin versions, we introduced a change where the featured images in views such as List and Month Views no longer link to the single event page. This was an intentional change aimed at improving accessibility (A11Y) for users who rely on screen readers or keyboard navigation. When both the event&#8230;<\/p>\n","protected":false},"author":46,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[59],"tags":[291],"stellar-product-taxonomy":[161],"class_list":["post-1966450","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing-resources","tag-6-x-calendar-views","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":59,"label":"PHP &amp; Functions"}],"post_tag":[{"value":291,"label":"6.x calendar views"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Iris Irvin","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/iris\/"},"comment_info":0,"category_info":[{"term_id":59,"name":"PHP &amp; Functions","slug":"customizing-resources","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":101,"filter":"raw","term_order":"0","cat_ID":59,"category_count":101,"category_description":"","cat_name":"PHP &amp; Functions","category_nicename":"customizing-resources","category_parent":24}],"tag_info":[{"term_id":291,"name":"6.x calendar views","slug":"6-x-calendar-views","term_group":0,"term_taxonomy_id":291,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1966450"}],"version-history":[{"count":4,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966450\/revisions"}],"predecessor-version":[{"id":1966459,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966450\/revisions\/1966459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1966450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1966450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1966450"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1966450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}