<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
        <loc>https://www.yixiangjiaoyu.com/</loc>
        <lastmod>2024-10-13T00:00:00+00:00</lastmod>
        <changefreq>weekly</changefreq>
        <priority>1.0</priority>
    </url>
    <url>
        <loc>https://www.yixiangjiaoyu.com/faq/</loc>
        <lastmod>2024-10-13T00:00:00+00:00</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>
    <!-- 文章 -->
    <?php
    $args = array(
        'post_type' => 'post',
        'posts_per_page' => -1
    );
    $posts = new WP_Query($args);
    if ($posts->have_posts()) :
        while ($posts->have_posts()) : $posts->the_post();
  ?>
    <url>
        <loc><?php the_permalink();?></loc>
        <lastmod><?php echo str_replace(" ", "T", get_the_modified_date('Y-m-d\TH:i:s+00:00'));?></lastmod>
        <changefreq>always</changefreq>
        <priority>0.9</priority>
    </url>
    <?php endwhile; endif; wp_reset_postdata();?>
    <!-- 页面 -->
    <?php
    $pages = get_pages();
    foreach ($pages as $page) {
  ?>
    <url>
        <loc><?php echo get_page_link($page->ID);?></loc>
        <lastmod><?php echo str_replace(" ", "T", get_page($page->ID)->post_modified);?></lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.5</priority>
    </url>
    <?php }?>
    <!-- 分类 -->
    <?php
    $categories = get_categories();
    foreach ($categories as $category) {
  ?>
    <url>
        <loc><?php echo get_category_link($category->term_id);?></loc>
        <lastmod><?php echo str_replace(" ", "T", date('Y-m-d\TH:i:s+00:00'));?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.3</priority>
    </url>
    <?php }?>
    <!-- 标签 -->
    <?php
    $tags = get_tags();
    foreach ($tags as $tag) {
  ?>
    <url>
        <loc><?php echo get_tag_link($tag->term_id);?></loc>
        <lastmod><?php echo str_replace(" ", "T", date('Y-m-d\TH:i:s+00:00'));?></lastmod>
        <changefreq>daily</changefreq>
        <priority>0.5</priority>
    </url>
    <?php }?>
</urlset>