

// Shortcode to display gallery images from the current post
function display_post_gallery($atts) {
    global $post;

    // Get all images attached to the current post
    $attachments = get_children(array(
        'post_parent'    => $post->ID,
        'post_type'      => 'attachment',
        'post_mime_type' => 'image',
        'orderby'        => 'menu_order',
        'order'          => 'ASC',
        'numberposts'    => -1
    ));

    if (empty($attachments)) {
        return '<p>No images found for this post.</p>';
    }

    // Build the gallery HTML
    $output = '<div class="grandpa-gallery"><div class="gallery-grid">';
    foreach ($attachments as $attachment) {
        $image_url = wp_get_attachment_image_url($attachment->ID, 'full');
        $image_alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
        $output .= '<div class="gallery-item">';
        $output .= '<div class="image-frame"><img src="' . esc_url($image_url) . '" alt="' . esc_attr($image_alt) . '" loading="lazy"></div>';
        $output .= '</div>';
    }
    $output .= '</div></div>';

    return $output;
}
add_shortcode('post_gallery', 'display_post_gallery');<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//grandpasdairy.au/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://grandpasdairy.au/post-sitemap.xml</loc>
		<lastmod>2026-05-15T03:13:45+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/page-sitemap.xml</loc>
		<lastmod>2026-06-04T02:47:57+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/product-sitemap.xml</loc>
		<lastmod>2026-03-26T05:24:52+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/clients-sitemap.xml</loc>
		<lastmod>2016-09-29T14:35:59+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/services-sitemap.xml</loc>
		<lastmod>2016-09-29T09:44:44+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/team-sitemap.xml</loc>
		<lastmod>2024-11-26T08:42:19+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/cp_recipe-sitemap.xml</loc>
		<lastmod>2026-03-19T01:51:22+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/category-sitemap.xml</loc>
		<lastmod>2026-04-17T08:11:37+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/product_cat-sitemap.xml</loc>
		<lastmod>2026-03-26T05:24:52+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/services_group-sitemap.xml</loc>
		<lastmod>2016-09-29T09:44:44+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/cp_recipe_category-sitemap.xml</loc>
		<lastmod>2026-03-19T01:51:22+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://grandpasdairy.au/author-sitemap.xml</loc>
		<lastmod>2026-05-28T03:42:17+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->