{"id":2172,"date":"2023-11-28T09:49:46","date_gmt":"2023-11-28T09:49:46","guid":{"rendered":"https:\/\/wpconsults.com\/?p=2172"},"modified":"2023-12-31T05:38:21","modified_gmt":"2023-12-31T05:38:21","slug":"creer-manuellement-un-sitemap-xml-2","status":"publish","type":"post","link":"https:\/\/www.wpconsults.com\/fr\/create-xml-sitemap-manually\/","title":{"rendered":"Comment cr\u00e9er manuellement un plan du site pour WordPress : Guide ultime"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Key Takeaways:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Generating XML sitemaps is crucial for search engine optimization (SEO) as it helps search engines understand the structure of your site.<\/li>\n\n\n\n<li>For WordPress users, creating an XML sitemap without relying on plugins is feasible and beneficial if you want to reduce plugin usage.<\/li>\n\n\n\n<li>Automate the process to include new posts and pages without manual updates.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A well-structured XML sitemap is a cornerstone of effective SEO for WordPress websites. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this comprehensive guide, we&#8217;ll walk you through every steps creating a robust XML sitemap manually without relying on plugins. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll cover sitemap for posts, pages, categories, and authors, enhancing search engine understanding and optimizing your site&#8217;s visibility.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_596b3e-ba, .wp-block-kadence-advancedheading.kt-adv-heading2172_596b3e-ba[data-kb-block=\"kb-adv-heading2172_596b3e-ba\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_596b3e-ba mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_596b3e-ba[data-kb-block=\"kb-adv-heading2172_596b3e-ba\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_596b3e-ba img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_596b3e-ba[data-kb-block=\"kb-adv-heading2172_596b3e-ba\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_596b3e-ba wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_596b3e-ba\"><strong>Step 1: <strong>Accessing Your WordPress Theme Files<\/strong><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your WordPress dashboard.<\/li>\n\n\n\n<li>In the left-hand menu, click on &#8220;<strong>Appearance<\/strong>.&#8221;<\/li>\n\n\n\n<li>From the drop-down, choose &#8220;<strong>Theme Editor<\/strong>.&#8221;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Find your theme&#8217;s <strong>functions.php<\/strong> file. This is where we&#8217;ll insert the code for our XML sitemap.<\/p>\n\n\n<style>.kb-image2172_071348-48 .kb-image-has-overlay:after{opacity:0.3;}.kb-image2172_071348-48 img.kb-img, .kb-image2172_071348-48 .kb-img img{box-shadow:0px 0px 4px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image2172_071348-48\"><figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1320\" height=\"318\" src=\"https:\/\/i0.wp.com\/wpconsults.com\/wp-content\/uploads\/2023\/11\/image-20.png?resize=1320%2C318&#038;ssl=1\" alt=\"How to Create Sitemap Manually - Step first: Locate function.php file\" class=\"kb-img wp-image-2176\" srcset=\"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2023\/11\/image-20.png?w=1904&amp;ssl=1 1904w, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2023\/11\/image-20.png?resize=300%2C72&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2023\/11\/image-20.png?resize=1024%2C247&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2023\/11\/image-20.png?resize=768%2C185&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2023\/11\/image-20.png?resize=1536%2C370&amp;ssl=1 1536w\" sizes=\"(max-width: 1320px) 100vw, 1320px\" \/><figcaption>Locate function.php file<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#ededed\"><strong>Note for Beginners:<\/strong><br>If you&#8217;re using a default or pre-built WordPress theme, it&#8217;s wise to use a child theme. Not sure how to set it up? No worries! Check out our guide on &#8220;<a href=\"https:\/\/wpconsults.com\/how-create-wordpress-child-theme\/\" data-type=\"post\" data-id=\"1204\" rel=\"nofollow noopener\" target=\"_blank\">How to Create a Child Theme<\/a>&#8221; first to keep your changes safe during updates.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_b1bc5f-15, .wp-block-kadence-advancedheading.kt-adv-heading2172_b1bc5f-15[data-kb-block=\"kb-adv-heading2172_b1bc5f-15\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_b1bc5f-15 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_b1bc5f-15[data-kb-block=\"kb-adv-heading2172_b1bc5f-15\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_b1bc5f-15 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_b1bc5f-15[data-kb-block=\"kb-adv-heading2172_b1bc5f-15\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_b1bc5f-15 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_b1bc5f-15\"><strong>Step 2: Add Sitemap Registration Code<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong>functions.php<\/strong>, scroll down to the end of the file. add the following code to register custom sitemaps for posts, pages, categories, and authors:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Register custom sitemaps\nfunction custom_sitemaps() {\n    add_rewrite_rule('sitemap.xml$', 'index.php?sitemap=1', 'top');\n    add_rewrite_rule('sitemap-posts.xml$', 'index.php?sitemap=posts', 'top');\n    add_rewrite_rule('sitemap-pages.xml$', 'index.php?sitemap=pages', 'top');\n    add_rewrite_rule('sitemap-categories.xml$', 'index.php?sitemap=categories', 'top');\n    add_rewrite_rule('sitemap-authors.xml$', 'index.php?sitemap=authors', 'top');\n}\n\nadd_action('init', 'custom_sitemaps');\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">\/\/ Register custom sitemaps<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">function custom_sitemaps() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    add_rewrite_rule(&#39;sitemap.xml$&#39;, &#39;index.php?sitemap=1&#39;, &#39;top&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    add_rewrite_rule(&#39;sitemap-posts.xml$&#39;, &#39;index.php?sitemap=posts&#39;, &#39;top&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    add_rewrite_rule(&#39;sitemap-pages.xml$&#39;, &#39;index.php?sitemap=pages&#39;, &#39;top&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    add_rewrite_rule(&#39;sitemap-categories.xml$&#39;, &#39;index.php?sitemap=categories&#39;, &#39;top&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    add_rewrite_rule(&#39;sitemap-authors.xml$&#39;, &#39;index.php?sitemap=authors&#39;, &#39;top&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">add_action(&#39;init&#39;, &#39;custom_sitemaps&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_bf1056-26, .wp-block-kadence-advancedheading.kt-adv-heading2172_bf1056-26[data-kb-block=\"kb-adv-heading2172_bf1056-26\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_bf1056-26 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_bf1056-26[data-kb-block=\"kb-adv-heading2172_bf1056-26\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_bf1056-26 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_bf1056-26[data-kb-block=\"kb-adv-heading2172_bf1056-26\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_bf1056-26 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_bf1056-26\"><strong>Step 3: <strong>Create<\/strong> Sitemap Functionality<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let&#8217;s add the functionality for generating sitemaps. Still in <strong>functions.php<\/strong>, scroll down further in the <code><strong>functions.php<\/strong><\/code> file insert the following code:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Generate custom sitemaps\nfunction generate_custom_sitemap() {\n    if (isset($_GET['sitemap'])) {\n        header(&quot;Content-Type: text\/xml&quot;);\n\n        switch ($_GET['sitemap']) {\n            case '1':\n                include('sitemap-index.php');\n                break;\n            case 'posts':\n                include('sitemap-posts.php');\n                break;\n            case 'pages':\n                include('sitemap-pages.php');\n                break;\n            case 'categories':\n                include('sitemap-categories.php');\n                break;\n            case 'authors':\n                include('sitemap-authors.php');\n                break;\n        }\n\n        exit;\n    }\n}\n\nadd_action('template_redirect', 'generate_custom_sitemap');\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">\/\/ Generate custom sitemaps<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">function generate_custom_sitemap() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (isset($_GET[&#39;sitemap&#39;])) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        header(<\/span><span style=\"color: #CE9178\">&quot;Content-Type<\/span><span style=\"color: #9CDCFE\">:<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">text<\/span><span style=\"color: #D4D4D4\">\/xml<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        switch ($_GET[&#39;sitemap&#39;]) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #569CD6\">case<\/span><span style=\"color: #D4D4D4\"> &#39;1&#39;<\/span><span style=\"color: #9CDCFE\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                include(&#39;sitemap-index.php&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                break<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #569CD6\">case<\/span><span style=\"color: #D4D4D4\"> &#39;posts&#39;<\/span><span style=\"color: #9CDCFE\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                include(&#39;sitemap-posts.php&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                break<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #569CD6\">case<\/span><span style=\"color: #D4D4D4\"> &#39;pages&#39;<\/span><span style=\"color: #9CDCFE\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                include(&#39;sitemap-pages.php&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                break<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #569CD6\">case<\/span><span style=\"color: #D4D4D4\"> &#39;categories&#39;<\/span><span style=\"color: #9CDCFE\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                include(&#39;sitemap-categories.php&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                break<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #569CD6\">case<\/span><span style=\"color: #D4D4D4\"> &#39;authors&#39;<\/span><span style=\"color: #9CDCFE\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                include(&#39;sitemap-authors.php&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                break<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        exit<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">add_action(&#39;template_redirect&#39;, &#39;generate_custom_sitemap&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_ca27b0-3c, .wp-block-kadence-advancedheading.kt-adv-heading2172_ca27b0-3c[data-kb-block=\"kb-adv-heading2172_ca27b0-3c\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_ca27b0-3c mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_ca27b0-3c[data-kb-block=\"kb-adv-heading2172_ca27b0-3c\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_ca27b0-3c img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_ca27b0-3c[data-kb-block=\"kb-adv-heading2172_ca27b0-3c\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_ca27b0-3c wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_ca27b0-3c\"><strong>Step 4: Create Sitemap Files<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this step, we&#8217;ll guide you on where and how to create new files for each type of custom sitemap.<\/p>\n\n\n\n<ol class=\"wp-block-list\" style=\"list-style-type:upper-roman\">\n<li><strong>Navigate to Your Theme Directory:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Using an FTP client or the file manager in your hosting control panel, locate your WordPress installation directory.<\/li>\n\n\n\n<li>Inside it, find the &#8220;wp-content&#8221; folder.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Access Your Theme Folder:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Inside &#8220;<strong>wp-content<\/strong>,&#8221; you&#8217;ll find a folder named &#8220;<strong>themes<\/strong>&#8221; Open it.<\/li>\n\n\n\n<li>Within the &#8220;<strong>themes<\/strong>&#8221; folder, look for your active theme&#8217;s folder (the one you&#8217;re currently using).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Create New Sitemap Files:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Inside your active theme&#8217;s folder, right-click and create new PHP files for each custom sitemap. For this guide, let&#8217;s create <strong><mark style=\"background-color:#eaeaea\" class=\"has-inline-color\"><code>sitemap-index.php<\/code>, <code>sitemap-posts.php<\/code>, <code>sitemap-pages.php<\/code>, <code>sitemap-categories.php<\/code> <\/mark><\/strong>and <code><strong><mark style=\"background-color:#ededed\" class=\"has-inline-color\">sitemap-authors.php<\/mark><\/strong><\/code> .<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_f6a731-76, .wp-block-kadence-advancedheading.kt-adv-heading2172_f6a731-76[data-kb-block=\"kb-adv-heading2172_f6a731-76\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_f6a731-76 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_f6a731-76[data-kb-block=\"kb-adv-heading2172_f6a731-76\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_f6a731-76 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_f6a731-76[data-kb-block=\"kb-adv-heading2172_f6a731-76\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading2172_f6a731-76 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_f6a731-76\">Edit<mark style=\"background-color:#eaeaea\" class=\"has-inline-color\"> <code><strong>sitemap-index.php<\/strong><\/code> <\/mark>file and insert following codes<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\necho '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';\n?&gt;\n&lt;sitemapindex xmlns=&quot;http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9&quot;&gt;\n    &lt;sitemap&gt;\n        &lt;loc&gt;&lt;?php echo home_url('\/'); ?&gt;sitemap-posts.xml&lt;\/loc&gt;\n    &lt;\/sitemap&gt;\n    &lt;sitemap&gt;\n        &lt;loc&gt;&lt;?php echo home_url('\/'); ?&gt;sitemap-pages.xml&lt;\/loc&gt;\n    &lt;\/sitemap&gt;\n&lt;\/sitemapindex&gt;\n\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">echo &#39;&lt;?xml version=<\/span><span style=\"color: #CE9178\">&quot;1.0&quot;<\/span><span style=\"color: #D4D4D4\"> encoding=<\/span><span style=\"color: #CE9178\">&quot;UTF-8&quot;<\/span><span style=\"color: #D4D4D4\">?&gt;&#39;<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;sitemapindex xmlns=<\/span><span style=\"color: #CE9178\">&quot;http<\/span><span style=\"color: #9CDCFE\">:<\/span><span style=\"color: #D4D4D4\">\/\/www.sitemaps.org\/schemas\/sitemap\/0.9<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;sitemap&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;loc&gt;&lt;?php echo home_url(&#39;\/&#39;)<\/span><span style=\"color: #6A9955\">; ?&gt;sitemap-posts.xml&lt;\/loc&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;\/sitemap&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;sitemap&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;loc&gt;&lt;?php echo home_url(&#39;\/&#39;)<\/span><span style=\"color: #6A9955\">; ?&gt;sitemap-pages.xml&lt;\/loc&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;\/sitemap&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;\/sitemapindex&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_b10244-f9, .wp-block-kadence-advancedheading.kt-adv-heading2172_b10244-f9[data-kb-block=\"kb-adv-heading2172_b10244-f9\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_b10244-f9 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_b10244-f9[data-kb-block=\"kb-adv-heading2172_b10244-f9\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_b10244-f9 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_b10244-f9[data-kb-block=\"kb-adv-heading2172_b10244-f9\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading2172_b10244-f9 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_b10244-f9\">Edit <code><code><strong><mark style=\"background-color:#eaeaea\" class=\"has-inline-color\">sitemap-posts.php<\/mark><\/strong><\/code><\/code> file and insert following codes<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\necho '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';\n?&gt;\n&lt;urlset xmlns=&quot;http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9&quot;&gt;\n    &lt;?php\n    $posts = get_posts(array('posts_per_page' =&gt; -1));\n\n    foreach ($posts as $post) {\n        setup_postdata($post);\n    ?&gt;\n        &lt;url&gt;\n            &lt;loc&gt;&lt;?php the_permalink(); ?&gt;&lt;\/loc&gt;\n            &lt;lastmod&gt;&lt;?php echo get_the_modified_date('c', $post-&gt;ID); ?&gt;&lt;\/lastmod&gt;\n            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;\n            &lt;priority&gt;0.8&lt;\/priority&gt;\n        &lt;\/url&gt;\n    &lt;?php\n    }\n    wp_reset_postdata();\n    ?&gt;\n&lt;\/urlset&gt;\n\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">echo &#39;&lt;?xml version=<\/span><span style=\"color: #CE9178\">&quot;1.0&quot;<\/span><span style=\"color: #D4D4D4\"> encoding=<\/span><span style=\"color: #CE9178\">&quot;UTF-8&quot;<\/span><span style=\"color: #D4D4D4\">?&gt;&#39;<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;urlset xmlns=<\/span><span style=\"color: #CE9178\">&quot;http<\/span><span style=\"color: #9CDCFE\">:<\/span><span style=\"color: #D4D4D4\">\/\/www.sitemaps.org\/schemas\/sitemap\/0.9<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    $posts = get_posts(<\/span><span style=\"color: #569CD6\">array<\/span><span style=\"color: #D4D4D4\">(&#39;posts_per_page&#39; =&gt; -1))<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">foreach<\/span><span style=\"color: #D4D4D4\"> ($posts as $post) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        setup_postdata($post)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;loc&gt;&lt;?php the_permalink()<\/span><span style=\"color: #6A9955\">; ?&gt;&lt;\/loc&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;lastmod&gt;&lt;?php echo get_the_mod<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\">ied_date(&#39;c&#39;, $post-&gt;ID)<\/span><span style=\"color: #6A9955\">; ?&gt;&lt;\/lastmod&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;priority&gt;0.8&lt;\/priority&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;\/url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    wp_reset_postdata()<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;\/urlset&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_8ffb20-de, .wp-block-kadence-advancedheading.kt-adv-heading2172_8ffb20-de[data-kb-block=\"kb-adv-heading2172_8ffb20-de\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_8ffb20-de mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_8ffb20-de[data-kb-block=\"kb-adv-heading2172_8ffb20-de\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_8ffb20-de img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_8ffb20-de[data-kb-block=\"kb-adv-heading2172_8ffb20-de\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading2172_8ffb20-de wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_8ffb20-de\">Edit <code><code><strong><mark style=\"background-color:#eaeaea\" class=\"has-inline-color\">sitemap-pages.php<\/mark><\/strong><\/code><\/code> file and insert following codes<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\necho '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';\n?&gt;\n&lt;urlset xmlns=&quot;http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9&quot;&gt;\n    &lt;?php\n    $pages = get_pages();\n\n    foreach ($pages as $page) {\n    ?&gt;\n        &lt;url&gt;\n            &lt;loc&gt;&lt;?php echo get_page_link($page-&gt;ID); ?&gt;&lt;\/loc&gt;\n            &lt;lastmod&gt;&lt;?php echo get_the_modified_date('c', $page-&gt;ID); ?&gt;&lt;\/lastmod&gt;\n            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;\n            &lt;priority&gt;0.7&lt;\/priority&gt;\n        &lt;\/url&gt;\n    &lt;?php\n    }\n    ?&gt;\n&lt;\/urlset&gt;\n\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">echo &#39;&lt;?xml version=<\/span><span style=\"color: #CE9178\">&quot;1.0&quot;<\/span><span style=\"color: #D4D4D4\"> encoding=<\/span><span style=\"color: #CE9178\">&quot;UTF-8&quot;<\/span><span style=\"color: #D4D4D4\">?&gt;&#39;<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;urlset xmlns=<\/span><span style=\"color: #CE9178\">&quot;http<\/span><span style=\"color: #9CDCFE\">:<\/span><span style=\"color: #D4D4D4\">\/\/www.sitemaps.org\/schemas\/sitemap\/0.9<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    $pages = get_pages()<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">foreach<\/span><span style=\"color: #D4D4D4\"> ($pages as $page) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;loc&gt;&lt;?php echo get_page_link($page-&gt;ID)<\/span><span style=\"color: #6A9955\">; ?&gt;&lt;\/loc&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;lastmod&gt;&lt;?php echo get_the_mod<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\">ied_date(&#39;c&#39;, $page-&gt;ID)<\/span><span style=\"color: #6A9955\">; ?&gt;&lt;\/lastmod&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;priority&gt;0.7&lt;\/priority&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;\/url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;\/urlset&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_81c92b-19, .wp-block-kadence-advancedheading.kt-adv-heading2172_81c92b-19[data-kb-block=\"kb-adv-heading2172_81c92b-19\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_81c92b-19 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_81c92b-19[data-kb-block=\"kb-adv-heading2172_81c92b-19\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_81c92b-19 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_81c92b-19[data-kb-block=\"kb-adv-heading2172_81c92b-19\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading2172_81c92b-19 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_81c92b-19\">Edit <code><code><strong><mark style=\"background-color:#eaeaea\" class=\"has-inline-color\">sitemap-<code>categories<\/code>.php<\/mark><\/strong><\/code><\/code> file and insert following codes<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Include necessary XML header\n&lt;?php\necho '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';\n?&gt;\n&lt;urlset xmlns=&quot;http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9&quot;&gt;\n    &lt;?php\n    $categories = get_categories();\n\n    foreach ($categories as $category) {\n    ?&gt;\n        &lt;url&gt;\n            &lt;loc&gt;&lt;?php echo get_category_link($category-&gt;term_id); ?&gt;&lt;\/loc&gt;\n            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;\n            &lt;priority&gt;0.6&lt;\/priority&gt;\n        &lt;\/url&gt;\n    &lt;?php\n    }\n    ?&gt;\n&lt;\/urlset&gt;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">\/\/ Include necessary XML header<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">echo &#39;&lt;?xml version=<\/span><span style=\"color: #CE9178\">&quot;1.0&quot;<\/span><span style=\"color: #D4D4D4\"> encoding=<\/span><span style=\"color: #CE9178\">&quot;UTF-8&quot;<\/span><span style=\"color: #D4D4D4\">?&gt;&#39;<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;urlset xmlns=<\/span><span style=\"color: #CE9178\">&quot;http<\/span><span style=\"color: #9CDCFE\">:<\/span><span style=\"color: #D4D4D4\">\/\/www.sitemaps.org\/schemas\/sitemap\/0.9<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    $categories = get_categories()<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">foreach<\/span><span style=\"color: #D4D4D4\"> ($categories as $category) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;loc&gt;&lt;?php echo get_category_link($category-&gt;term_id)<\/span><span style=\"color: #6A9955\">; ?&gt;&lt;\/loc&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;priority&gt;0.6&lt;\/priority&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;\/url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;\/urlset&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_dd7c43-7a, .wp-block-kadence-advancedheading.kt-adv-heading2172_dd7c43-7a[data-kb-block=\"kb-adv-heading2172_dd7c43-7a\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_dd7c43-7a mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_dd7c43-7a[data-kb-block=\"kb-adv-heading2172_dd7c43-7a\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_dd7c43-7a img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_dd7c43-7a[data-kb-block=\"kb-adv-heading2172_dd7c43-7a\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading2172_dd7c43-7a wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_dd7c43-7a\">Edit <code><code><strong><mark style=\"background-color:#eaeaea\" class=\"has-inline-color\">sitemap-<code><code>authors<\/code><\/code>.php<\/mark><\/strong><\/code><\/code> file and insert following codes<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .75rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#d4d4d433\" stroke=\"#d4d4d44d\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Include necessary XML header\n&lt;?php\necho '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';\n?&gt;\n&lt;urlset xmlns=&quot;http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9&quot;&gt;\n    &lt;?php\n    $authors = get_users('who=authors');\n\n    foreach ($authors as $author) {\n    ?&gt;\n        &lt;url&gt;\n            &lt;loc&gt;&lt;?php echo get_author_posts_url($author-&gt;ID); ?&gt;&lt;\/loc&gt;\n            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;\n            &lt;priority&gt;0.6&lt;\/priority&gt;\n        &lt;\/url&gt;\n    &lt;?php\n    }\n    ?&gt;\n&lt;\/urlset&gt;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">\/\/ Include necessary XML header<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">echo &#39;&lt;?xml version=<\/span><span style=\"color: #CE9178\">&quot;1.0&quot;<\/span><span style=\"color: #D4D4D4\"> encoding=<\/span><span style=\"color: #CE9178\">&quot;UTF-8&quot;<\/span><span style=\"color: #D4D4D4\">?&gt;&#39;<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;urlset xmlns=<\/span><span style=\"color: #CE9178\">&quot;http<\/span><span style=\"color: #9CDCFE\">:<\/span><span style=\"color: #D4D4D4\">\/\/www.sitemaps.org\/schemas\/sitemap\/0.9<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    $authors = get_users(&#39;who=authors&#39;)<\/span><span style=\"color: #6A9955\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">foreach<\/span><span style=\"color: #D4D4D4\"> ($authors as $author) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;loc&gt;&lt;?php echo get_author_posts_url($author-&gt;ID)<\/span><span style=\"color: #6A9955\">; ?&gt;&lt;\/loc&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;changefreq&gt;weekly&lt;\/changefreq&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            &lt;priority&gt;0.6&lt;\/priority&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        &lt;\/url&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&lt;\/urlset&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_2dc265-40, .wp-block-kadence-advancedheading.kt-adv-heading2172_2dc265-40[data-kb-block=\"kb-adv-heading2172_2dc265-40\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_2dc265-40 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_2dc265-40[data-kb-block=\"kb-adv-heading2172_2dc265-40\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_2dc265-40 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_2dc265-40[data-kb-block=\"kb-adv-heading2172_2dc265-40\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_2dc265-40 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_2dc265-40\"><strong>Step 5: Test Your Sitemap<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Test the newly created sitemaps by visiting the following URLs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Main sitemap: <code>http:\/\/yoursite.com\/sitemap.xml<\/code><\/li>\n\n\n\n<li>Post sitemap: <code>http:\/\/yoursite.com\/sitemap-posts.xml<\/code><\/li>\n\n\n\n<li>Page sitemap: <code>http:\/\/yoursite.com\/sitemap-pages.xml<\/code><\/li>\n\n\n\n<li>Categories sitemap: <code>http:\/\/yoursite.com\/sitemap-categories.xml<\/code><\/li>\n\n\n\n<li>Authors sitemap: <code>http:\/\/yoursite.com\/sitemap-authors.xml<\/code><\/li>\n<\/ul>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_676316-0b, .wp-block-kadence-advancedheading.kt-adv-heading2172_676316-0b[data-kb-block=\"kb-adv-heading2172_676316-0b\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_676316-0b mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_676316-0b[data-kb-block=\"kb-adv-heading2172_676316-0b\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_676316-0b img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_676316-0b[data-kb-block=\"kb-adv-heading2172_676316-0b\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_676316-0b wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_676316-0b\">Step 6: Submit Sitemap to Google Search Console<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After creating sitemap you need to submit your sitemaps in google search console to tell google about your WordPress site&#8217;s structure and index them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By following this comprehensive guide, you&#8217;ve crafted a powerful XML sitemap tailored to your WordPress site&#8217;s structure, all without the need for plugins. This meticulous approach, ensures that your site&#8217;s content is accurately communicated to search engines, ultimately leading to improved SEO and increased visibility.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading2172_93e49c-9f, .wp-block-kadence-advancedheading.kt-adv-heading2172_93e49c-9f[data-kb-block=\"kb-adv-heading2172_93e49c-9f\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading2172_93e49c-9f mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading2172_93e49c-9f[data-kb-block=\"kb-adv-heading2172_93e49c-9f\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading2172_93e49c-9f img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading2172_93e49c-9f[data-kb-block=\"kb-adv-heading2172_93e49c-9f\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading2172_93e49c-9f wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading2172_93e49c-9f\">People also asked this but answer is same<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>FAQs on Manual XML Sitemap Creation for WordPress<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I manually add a sitemap to WordPress?<\/strong><br>A: Begin by accessing your WordPress dashboard and navigating to &#8220;Appearance&#8221; &gt; &#8220;Theme Editor.&#8221; Ensure a secure process by implementing changes in a child theme. Our step-by-step guide provides detailed instructions for manual sitemap integration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I create a sitemap for WordPress?<\/strong><br>A: Delve into our comprehensive guide, where we walk you through the intricacies of crafting a sitemap manually for your WordPress site. Understand the nuances of each step to harness the full SEO potential.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I manually create a sitemap?<\/strong><br>A: Tailor your sitemap to your WordPress site&#8217;s unique structure with our guide&#8217;s specific instructions. Learn how to handcraft a sitemap that ensures search engines grasp the nuances of your content hierarchy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I manually edit a sitemap in WordPress?<\/strong><br>A: Navigate to the functions.php file in your child theme to make precise manual edits to your sitemap. Our guide elucidates this process, emphasizing the importance of maintaining theme integrity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How to create an HTML sitemap in WordPress without a plugin?<\/strong><br>A: Explore our guide for an insightful, plugin-free approach to building an HTML sitemap in WordPress. Gain a nuanced understanding of the process and maintain a clean site structure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I add an HTML sitemap to WordPress?<\/strong><br>A: Follow our specific steps for manual HTML sitemap integration into your WordPress site. Our guide ensures a meticulous process that aligns with your site&#8217;s unique needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I add a link to my WordPress sitemap?<\/strong><br>A: Learn the art of manual link insertion to your sitemap in WordPress. Our guide provides specific insights into this process, allowing you to seamlessly integrate the link within your site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I submit an XML sitemap in WordPress?<\/strong><br>A: After crafting your XML sitemap manually, refer to our guide for a specific submission process. Understand the intricacies of submitting it to search engines via their respective webmaster tools for effective indexing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How do I manually find the sitemap of a website?<\/strong><br>A: Gain valuable insights into the specific steps for manually locating a website&#8217;s sitemap. Our guide details the process, whether by appending &#8220;\/sitemap.xml&#8221; to the domain or examining the robots.txt file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Principaux enseignements : Un sitemap XML bien structur\u00e9 est la pierre angulaire d'un r\u00e9f\u00e9rencement efficace pour les sites WordPress. Dans ce guide complet, nous vous guiderons \u00e0 travers toutes les \u00e9tapes de la cr\u00e9ation d'un sitemap XML robuste manuellement sans d\u00e9pendre de plugins. Nous couvrirons le sitemap pour les articles, les pages, les cat\u00e9gories et les auteurs, am\u00e9liorant ainsi la compr\u00e9hension des moteurs de recherche et optimisant la visibilit\u00e9 de votre site. \u00c9tape 1 :...<\/p>","protected":false},"author":1,"featured_media":3246,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_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,"_kad_post_classname":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"rank_math_title":"%title% %page%","rank_math_description":"In this comprehensive guide, we'll walk you through every steps creating a dynamic XML sitemap manually for WordPress without relying on any plugins. ","rank_math_focus_keyword":"Create Sitemap,create sitemap wordpress,create sitemap manually,create sitemap wordpress manually","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,7],"tags":[18,64,35],"class_list":["post-2172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-seo-practices","category-wordpress-tips-tutorials","tag-seo","tag-without-plugin-series","tag-wordpress-tutorials"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1280%2C720&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pboFy3-z2","jetpack-related-posts":[{"id":3142,"url":"https:\/\/www.wpconsults.com\/fr\/fix-your-sitemap-appears-to-be-an-html-page-error\/","url_meta":{"origin":2172,"position":0},"title":"How to Fix &#8220;Your Sitemap Appears to Be An HTML Page&#8221; Error [Proven]","author":"Abdullah Nouman","date":"mai 8, 2024","format":false,"excerpt":"Vous avez d\u00e9j\u00e0 soumis le sitemap de votre site web \u00e0 Google Search Console et vous vous \u00eates retrouv\u00e9 avec un message d\u00e9routant : \"Votre plan du site semble \u00eatre une page HTML\" ? Ne craignez rien, guerriers du web ! Ce probl\u00e8me n'est pas rare et il est facile de le r\u00e9soudre. 1. Quel est l'int\u00e9r\u00eat des sitemaps ? Les moteurs de recherche comme Google s'appuient...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/fr\/category\/search-console-tips-and-tutorials\/"},"img":{"alt_text":"Image showing Your Sitemap Appears to Be An HTML Page error on google search console","src":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Html-sitemap-errorl.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Html-sitemap-errorl.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Html-sitemap-errorl.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Html-sitemap-errorl.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Html-sitemap-errorl.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3417,"url":"https:\/\/www.wpconsults.com\/fr\/sitemap-couldnt-fetch-issue-solved\/","url_meta":{"origin":2172,"position":1},"title":"Comment r\u00e9soudre le probl\u00e8me \"Sitemap Couldn't Fetch Issue\" dans Google Search Console : Un guide d\u00e9taill\u00e9","author":"Abdullah Nouman","date":"septembre 10, 2024","format":false,"excerpt":"Suivez mon blog sur Bloglovin L'erreur \"sitemap couldn't fetch\" dans Google Search Console peut \u00eatre un obstacle frustrant pour les webmasters et les professionnels du r\u00e9f\u00e9rencement. Ce guide complet vous guidera \u00e0 travers les causes communes de ce probl\u00e8me et vous fournira des solutions avanc\u00e9es pour vous assurer que votre sitemap est correctement explor\u00e9 et index\u00e9...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/fr\/category\/search-console-tips-and-tutorials\/"},"img":{"alt_text":"Sitemap Couldn't Fetch Issue in Google search console","src":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/09\/image-8.png?fit=927%2C391&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/09\/image-8.png?fit=927%2C391&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/09\/image-8.png?fit=927%2C391&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/09\/image-8.png?fit=927%2C391&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3372,"url":"https:\/\/www.wpconsults.com\/fr\/submit-url-to-duckduckgo\/","url_meta":{"origin":2172,"position":2},"title":"Comment soumettre une URL \u00e0 DuckDuckGo ? Un guide \u00e9tape par \u00e9tape","author":"Abdullah Nouman","date":"septembre 4, 2024","format":false,"excerpt":"Soumettre votre URL \u00e0 DuckDuckGo peut sembler un peu d\u00e9licat au d\u00e9but, d'autant plus qu'il n'y a pas de processus de soumission directe comme pour Google ou Bing. Mais ne vous inqui\u00e9tez pas ! Je suis l\u00e0 pour vous expliquer de mani\u00e8re simple et compr\u00e9hensible ce qu'il faut faire. 1. Comprendre l'approche de DuckDuckGo Tout d'abord, parlons de ce que...","rel":"","context":"In &quot;SEO&quot;","block_context":{"text":"SEO","link":"https:\/\/www.wpconsults.com\/fr\/category\/best-seo-practices\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3202,"url":"https:\/\/www.wpconsults.com\/fr\/finding-crawl-budget-and-its-use-cases\/","url_meta":{"origin":2172,"position":3},"title":"Budget de crawl : Comment le trouver dans Google Search Console et ses cas d'utilisation","author":"Abdullah Nouman","date":"mai 23, 2024","format":false,"excerpt":"Bonjour \u00e0 tous ! Si vous plongez dans le monde du r\u00e9f\u00e9rencement, vous avez probablement rencontr\u00e9 le terme \"crawl budget\". Mais de quoi s'agit-il exactement et pourquoi devriez-vous vous en pr\u00e9occuper ? D\u00e9cortiquons-le et voyons comment vous pouvez utiliser Google Search Console pour le surveiller. Qu'est-ce que le budget de...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/fr\/category\/search-console-tips-and-tutorials\/"},"img":{"alt_text":"Google search console crawl budget page","src":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Google-search-console-crawl-budget-page-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Google-search-console-crawl-budget-page-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Google-search-console-crawl-budget-page-jpg.webp?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Google-search-console-crawl-budget-page-jpg.webp?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/Google-search-console-crawl-budget-page-jpg.webp?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3069,"url":"https:\/\/www.wpconsults.com\/fr\/how-to-fix-canonical-url-not-in-property\/","url_meta":{"origin":2172,"position":4},"title":"Comment r\u00e9soudre le probl\u00e8me \"Canonical URL Not in Property\" dans Google Search Console ?","author":"Abdullah Nouman","date":"juin 14, 2024","format":false,"excerpt":"Si vous voyez l'erreur \"Canonical URL not in property\" dans Google Search Console, cela signifie qu'il y a un d\u00e9calage entre la fa\u00e7on dont votre site est configur\u00e9 et la fa\u00e7on dont votre propri\u00e9t\u00e9 Search Console est configur\u00e9e. Cette erreur peut emp\u00eacher Google de comprendre la structure de votre site et de d\u00e9terminer quelles pages doivent...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/fr\/category\/search-console-tips-and-tutorials\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2933,"url":"https:\/\/www.wpconsults.com\/fr\/hvac-seo-guide\/","url_meta":{"origin":2172,"position":5},"title":"Guide SEO HVAC 2024 : Dominer les r\u00e9sultats de recherche avec HVAC SEO","author":"Abdullah Nouman","date":"f\u00e9vrier 29, 2024","format":false,"excerpt":"Votre site web CVC est-il invisible en ligne ? D\u00e9couvrez comment le r\u00e9f\u00e9rencement CVC peut apporter un flux r\u00e9gulier de prospects qualifi\u00e9s \u00e0 votre entreprise locale de CVC. Qu'est-ce que le r\u00e9f\u00e9rencement CVC ? Le r\u00e9f\u00e9rencement CVC est un sous-ensemble du r\u00e9f\u00e9rencement qui se concentre sur l'optimisation de votre site Web pour les mots cl\u00e9s et les expressions li\u00e9s \u00e0 vos services CVC, tels que...","rel":"","context":"In &quot;SEO&quot;","block_context":{"text":"SEO","link":"https:\/\/www.wpconsults.com\/fr\/category\/best-seo-practices\/"},"img":{"alt_text":"Hvac SEO Guide Thumbnail","src":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/03\/Hvac-SEO-Guide-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/03\/Hvac-SEO-Guide-jpg.webp?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/03\/Hvac-SEO-Guide-jpg.webp?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/03\/Hvac-SEO-Guide-jpg.webp?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/03\/Hvac-SEO-Guide-jpg.webp?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/posts\/2172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/comments?post=2172"}],"version-history":[{"count":0,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/posts\/2172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/media\/3246"}],"wp:attachment":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/media?parent=2172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/categories?post=2172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/tags?post=2172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}