        ];
    }, $faqs );

    $page_url = is_singular()
        ? get_permalink()
        : 'https://www.calcleanseal.com' . strtok( $current_url, '?' );

    $schema = [
        '@context'   => 'https://schema.org',
        '@type'      => 'FAQPage',
        '@id'        => trailingslashit( $page_url ) . '#faq',
        'mainEntity' => $entities,
    ];

    ccsseo_print_schema( $schema );
}

/* ============================================================
   BREADCRUMBLIST
   ============================================================ */

add_action( 'wp_head', 'ccsseo_breadcrumb_schema', 10 );
function ccsseo_breadcrumb_schema() {
    if ( is_front_page() || ! is_singular() ) return;

    $items = [ [
        '@type'    => 'ListItem',
        'position' => 1,
        'name'     => 'Home',
        'item'     => 'https://www.calcleanseal.com',
    ] ];

    $parent_id = wp_get_post_parent_id( get_the_ID() );
    if ( $parent_id ) {
        $items[] = [
            '@type'    => 'ListItem',
            'position' => 2,
            'name'     => get_the_title( $parent_id ),
            'item'     => get_permalink( $parent_id ),
        ];
        $items[] = [
            '@type'    => 'ListItem',
            'position' => 3,
            'name'     => is_page( 1846 ) ? 'Concrete Staining Services' : get_the_title(),
            'item'     => get_permalink(),
        ];
    } else {
        $items[] = [
            '@type'    => 'ListItem',
            'position' => 2,
            'name'     => is_page( 1846 ) ? 'Concrete Staining Services' : get_the_title(),
            'item'     => get_permalink(),
        ];
    }

    $schema = [
        '@context'        => 'https://schema.org',
        '@type'           => 'BreadcrumbList',
        'itemListElement' => $items,
    ];

    ccsseo_print_schema( $schema );
}

/* ============================================================
   ARTICLE SCHEMA — blog posts
   ============================================================ */

add_action( 'wp_head', 'ccsseo_article_schema', 11 );
function ccsseo_article_schema() {
    if ( ! is_single() || get_post_type() !== 'post' ) return;

    $schema = [
        '@context'      => 'https://schema.org',
        '@type'         => 'Article',
        'headline'      => get_the_title(),
        'datePublished' => get_the_date( 'c' ),
        'dateModified'  => get_the_modified_date( 'c' ),
        'url'           => get_permalink(),
        'author'        => [
            '@type' => 'Organization',
            'name'  => 'California Clean and Seal',
            '@id'   => 'https://www.calcleanseal.com/#business',
        ],
        'publisher' => [
            '@type' => 'Organization',
            'name'  => 'California Clean and Seal',
            'logo'  => [
                '@type' => 'ImageObject',
                'url'   => 'https://calcleanseal.com/wp-content/uploads/logo.png',
            ],
        ],
        'image'         => has_post_thumbnail()
            ? get_the_post_thumbnail_url( null, 'large' )
            : 'https://calcleanseal.com/wp-content/uploads/logo.png',
        'mainEntityOfPage' => [
            '@type' => 'WebPage',
            '@id'   => get_permalink(),
        ],
    ];

    ccsseo_print_schema( $schema );
}

/* ============================================================
   ROBOTS.TXT — allow all AI crawlers + standard bots
   ============================================================ */

add_filter( 'robots_txt', 'ccsseo_robots_txt', 99 );
function ccsseo_robots_txt( $output ) {
    $custom  = "User-agent: *\n";
    $custom .= "Disallow: /wp-admin/\n";
    $custom .= "Allow: /wp-admin/admin-ajax.php\n\n";

    $bots = [
        'GPTBot', 'ChatGPT-User', 'OAI-SearchBot',
        'ClaudeBot', 'Claude-Web', 'anthropic-ai',
        'PerplexityBot', 'Google-Extended',
        'Googlebot', 'Bingbot',
    ];

    foreach ( $bots as $bot ) {
        $custom .= "User-agent: {$bot}\nAllow: /\n\n";
    }

    $custom .= "Sitemap: https://www.calcleanseal.com/sitemap_index.xml\n";
    return $custom;
}
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.calcleanseal.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.calcleanseal.com/post-sitemap.xml</loc>
		<lastmod>2026-09-27T04:35:17+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.calcleanseal.com/page-sitemap.xml</loc>
		<lastmod>2026-10-01T05:12:42+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->