// Register the shortcode for the All Tags page
add_shortcode( 'bgames_all_tags', 'bgames_render_all_tags_page' );

function bgames_render_all_tags_page() {
    // Retrieve all active tags
    $tags = get_terms( array(
        'taxonomy'   => 'post_tag',
        'hide_empty' => true,
    ) );

    if ( is_wp_error( $tags ) || empty( $tags ) ) {
        return '';
    }

    // Reuse the exact same 'category-grid' class from your Categories page
    $html = '<ul class="category-grid">';

    foreach ( $tags as $tag ) {
        $tag_link = get_term_link( $tag );
        
        // Call the optimized image function we created earlier
        $image_url = bgames_get_tag_latest_featured_image_url( $tag->term_id );
        
        $img_html = '';
        if ( $image_url ) {
            $img_html = '<img src="' . esc_url( $image_url ) . '" alt="' . esc_attr( $tag->name ) . ' Games" loading="lazy">';
        }

        $html .= '<li class="cat-item">';
        $html .= '<a href="' . esc_url( $tag_link ) . '" class="cat-item-link">';
        $html .= $img_html;
        $html .= '<span class="cat-item-title">' . esc_html( $tag->name ) . ' Games</span>';
        $html .= '</a>';
        $html .= '</li>';
    }

    $html .= '</ul>';

    return $html;
}<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//shooter-games.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://shooter-games.com/post-sitemap.xml</loc>
		<lastmod>2026-09-19T11:20:55+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://shooter-games.com/post-sitemap2.xml</loc>
		<lastmod>2026-09-17T10:35:03+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://shooter-games.com/post-sitemap3.xml</loc>
		<lastmod>2026-09-19T11:20:55+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://shooter-games.com/page-sitemap.xml</loc>
		<lastmod>2026-09-19T06:18:07+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://shooter-games.com/category-sitemap.xml</loc>
		<lastmod>2026-09-19T11:20:55+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://shooter-games.com/post_tag-sitemap.xml</loc>
		<lastmod>2026-09-19T11:20:55+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://shooter-games.com/author-sitemap.xml</loc>
		<lastmod>2026-07-25T05:43:56+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->