{"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":"xml-sitemap-manuell-erstellen","status":"publish","type":"post","link":"https:\/\/www.wpconsults.com\/de\/create-xml-sitemap-manually\/","title":{"rendered":"Manuelles Erstellen der Sitemap f\u00fcr WordPress: Ultimative Anleitung"},"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>Wichtigste Erkenntnisse: Eine gut strukturierte XML-Sitemap ist ein Eckpfeiler der effektiven SEO f\u00fcr WordPress-Websites. In diesem umfassenden Leitfaden f\u00fchren wir Sie durch alle Schritte zur manuellen Erstellung einer robusten XML-Sitemap, ohne dabei auf Plugins angewiesen zu sein. Wir behandeln Sitemaps f\u00fcr Beitr\u00e4ge, Seiten, Kategorien und Autoren, um das Verst\u00e4ndnis der Suchmaschinen zu verbessern und die Sichtbarkeit Ihrer Website zu optimieren. Schritt 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\/de\/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":"Haben Sie schon einmal die Sitemap Ihrer Website an die Google Search Console \u00fcbermittelt, um dann die verwirrende Meldung zu erhalten: \"Ihre Sitemap scheint eine HTML-Seite zu sein\"? Keine Angst, Website-Krieger! Das ist keine Seltenheit, und die L\u00f6sung ist ein Kinderspiel. 1. Was ist das Problem mit Sitemaps? Suchmaschinen wie Google verlassen sich...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/de\/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\/de\/sitemap-couldnt-fetch-issue-solved\/","url_meta":{"origin":2172,"position":1},"title":"Wie man das Problem \"Sitemap konnte nicht abgerufen werden\" in der Google Search Console l\u00f6st: Eine ausf\u00fchrliche Anleitung","author":"Abdullah Nouman","date":"September 10, 2024","format":false,"excerpt":"Meinem Blog auf Bloglovin folgen Die Fehlermeldung \"Sitemap konnte nicht abgerufen werden\" in der Google Search Console kann f\u00fcr Webmaster und SEO-Experten ein frustrierendes Hindernis darstellen. Dieser umfassende Leitfaden f\u00fchrt Sie durch die h\u00e4ufigsten Ursachen f\u00fcr dieses Problem und bietet fortschrittliche L\u00f6sungen, um sicherzustellen, dass Ihre Sitemap ordnungsgem\u00e4\u00df gecrawlt und indiziert wird...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/de\/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\/de\/submit-url-to-duckduckgo\/","url_meta":{"origin":2172,"position":2},"title":"Wie \u00fcbermittelt man eine URL an DuckDuckGo? Eine Schritt-f\u00fcr-Schritt-Anleitung","author":"Abdullah Nouman","date":"September 4, 2024","format":false,"excerpt":"Die Anmeldung Ihrer URL bei DuckDuckGo mag anfangs etwas kompliziert erscheinen, vor allem weil es keinen direkten Anmeldeprozess wie bei Google oder Bing gibt. Aber keine Sorge! Ich erkl\u00e4re es Ihnen hier auf leicht verst\u00e4ndliche Weise. 1. Den Ansatz von DuckDuckGo verstehen Zun\u00e4chst einmal sollten wir dar\u00fcber sprechen, was...","rel":"","context":"In &quot;SEO&quot;","block_context":{"text":"SEO","link":"https:\/\/www.wpconsults.com\/de\/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\/de\/finding-crawl-budget-and-its-use-cases\/","url_meta":{"origin":2172,"position":3},"title":"Crawl-Budget: Wie man es in der Google Search Console findet und seine Anwendungsf\u00e4lle","author":"Abdullah Nouman","date":"Mai 23, 2024","format":false,"excerpt":"Hallo zusammen! Wenn Sie in die Welt der Suchmaschinenoptimierung eintauchen, sind Sie wahrscheinlich schon auf den Begriff \"Crawl-Budget\" gesto\u00dfen. Aber was genau ist das, und warum sollten Sie sich daf\u00fcr interessieren? Schauen wir uns an, was es damit auf sich hat und wie Sie Google Search Console nutzen k\u00f6nnen, um es im Auge zu behalten. Was ist Crawl-Budget?...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/de\/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\/de\/how-to-fix-canonical-url-not-in-property\/","url_meta":{"origin":2172,"position":4},"title":"So beheben Sie die Meldung \"Kanonische URL nicht in der Eigenschaft\" in der Google Search Console","author":"Abdullah Nouman","date":"Juni 14, 2024","format":false,"excerpt":"Wenn Sie die Fehlermeldung \"Canonical URL not in property\" in der Google Search Console sehen, bedeutet dies, dass es eine Diskrepanz zwischen der Art und Weise gibt, wie Ihre Website eingerichtet ist und wie Ihre Search Console Eigenschaft konfiguriert ist. Dieser Fehler kann Google daran hindern, die Struktur Ihrer Website zu verstehen und welche Seiten...","rel":"","context":"In &quot;Search Console Tips &amp; Tutorials&quot;","block_context":{"text":"Search Console Tips &amp; Tutorials","link":"https:\/\/www.wpconsults.com\/de\/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\/de\/hvac-seo-guide\/","url_meta":{"origin":2172,"position":5},"title":"HVAC SEO Leitfaden 2024: Dominieren Sie die Suchergebnisse mit HVAC SEO","author":"Abdullah Nouman","date":"Februar 29, 2024","format":false,"excerpt":"Ist Ihre HVAC-Website online unsichtbar? Entdecken Sie, wie HVAC SEO einen stetigen Strom qualifizierter Leads f\u00fcr Ihr lokales HVAC-Gesch\u00e4ft bringen kann. Was ist HLK-SEO? HLK-SEO ist ein Teilbereich der SEO, der sich auf die Optimierung Ihrer Website f\u00fcr Schl\u00fcsselw\u00f6rter und Phrasen im Zusammenhang mit Ihren HLK-Dienstleistungen konzentriert, wie z. B....","rel":"","context":"In &quot;SEO&quot;","block_context":{"text":"SEO","link":"https:\/\/www.wpconsults.com\/de\/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\/de\/wp-json\/wp\/v2\/posts\/2172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/comments?post=2172"}],"version-history":[{"count":0,"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/posts\/2172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/media\/3246"}],"wp:attachment":[{"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/media?parent=2172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/categories?post=2172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wpconsults.com\/de\/wp-json\/wp\/v2\/tags?post=2172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}