{"id":1122,"date":"2025-03-10T07:24:30","date_gmt":"2025-03-10T07:24:30","guid":{"rendered":"https:\/\/toolsblaster.com\/?p=1122"},"modified":"2025-04-20T21:20:30","modified_gmt":"2025-04-20T21:20:30","slug":"sitemaps-generator","status":"publish","type":"post","link":"https:\/\/toolsblaster.com\/?p=1122","title":{"rendered":"Advanced Best Sitemap Generator"},"content":{"rendered":"\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"450\" data-id=\"1183\" src=\"https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1.webp\" alt=\"\" class=\"wp-image-1183\" srcset=\"https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1.webp 800w, https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1-300x169.webp 300w, https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1-768x432.webp 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n<\/figure>\n\n\n\n<div class=\"bing-serp-checker\" style=\"background-color: #f4f4f9; padding: 20px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); text-align: center;\">\n  <h2 style=\"color: #033676; margin-bottom: 15px; font-size: 28px; text-align: center;\">Advanced Sitemap Generator<\/h2>\n  <p style=\"font-size: 18px; color: #333; line-height: 1.6; margin-bottom: 25px; text-align: center;\">\n    Generate professional sitemaps for WordPress, Blogger, and HTML websites with detailed options\n  <\/p>\n\n  <!-- Platform Selection Tabs -->\n  <div style=\"display: flex; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px;\">\n    <button class=\"platform-tab active\" onclick=\"showPlatform('wordpress')\" style=\"padding: 10px 20px; background-color: #009dff; color: white; border: none; border-radius: 5px; cursor: pointer;\">WordPress<\/button>\n    <button class=\"platform-tab\" onclick=\"showPlatform('blogger')\" style=\"padding: 10px 20px; background-color: #e0e0e0; color: #333; border: none; border-radius: 5px; cursor: pointer;\">Blogger<\/button>\n    <button class=\"platform-tab\" onclick=\"showPlatform('html')\" style=\"padding: 10px 20px; background-color: #e0e0e0; color: #333; border: none; border-radius: 5px; cursor: pointer;\">HTML<\/button>\n  <\/div>\n\n  <!-- Main Generator Area -->\n  <div style=\"background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\">\n    \n    <!-- WordPress Options -->\n    <div id=\"wordpress-options\" class=\"platform-options\">\n      <h3 style=\"color: #033676; margin-top: 0; margin-bottom: 20px;\">WordPress Sitemap Settings<\/h3>\n      \n      <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px;\">\n        <div class=\"input-group\">\n          <label for=\"wp-url\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">WordPress Site URL<\/label>\n          <input type=\"url\" id=\"wp-url\" placeholder=\"https:\/\/yourwordpresssite.com\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px;\">\n        <\/div>\n      <\/div>\n      \n      <div style=\"margin-top: 20px;\">\n        <h4 style=\"color: #033676; margin-bottom: 10px;\">Include in Sitemap:<\/h4>\n        <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px;\">\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"wp-posts\" checked style=\"margin-right: 8px;\">\n            <label for=\"wp-posts\" style=\"margin-bottom: 0;\">Posts<\/label>\n          <\/div>\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"wp-pages\" checked style=\"margin-right: 8px;\">\n            <label for=\"wp-pages\" style=\"margin-bottom: 0;\">Pages<\/label>\n          <\/div>\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"wp-categories\" checked style=\"margin-right: 8px;\">\n            <label for=\"wp-categories\" style=\"margin-bottom: 0;\">Categories<\/label>\n          <\/div>\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"wp-tags\" style=\"margin-right: 8px;\">\n            <label for=\"wp-tags\" style=\"margin-bottom: 0;\">Tags<\/label>\n          <\/div>\n        <\/div>\n      <\/div>\n      \n      <div class=\"input-group\" style=\"margin-top: 20px;\">\n        <label for=\"wp-exclude\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">Exclude URLs (comma separated)<\/label>\n        <input type=\"text\" id=\"wp-exclude\" placeholder=\"\/sample-page, \/category\/uncategorized\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px;\">\n      <\/div>\n    <\/div>\n    \n    <!-- Blogger Options -->\n    <div id=\"blogger-options\" class=\"platform-options\" style=\"display: none;\">\n      <h3 style=\"color: #033676; margin-top: 0; margin-bottom: 20px;\">Blogger Sitemap Settings<\/h3>\n      \n      <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px;\">\n        <div class=\"input-group\">\n          <label for=\"blogger-url\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">Blogger Site URL<\/label>\n          <input type=\"url\" id=\"blogger-url\" placeholder=\"https:\/\/yourblog.blogspot.com\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px;\">\n        <\/div>\n      <\/div>\n      \n      <div style=\"margin-top: 20px;\">\n        <h4 style=\"color: #033676; margin-bottom: 10px;\">Include in Sitemap:<\/h4>\n        <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px;\">\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"blogger-posts\" checked style=\"margin-right: 8px;\">\n            <label for=\"blogger-posts\" style=\"margin-bottom: 0;\">Posts<\/label>\n          <\/div>\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"blogger-pages\" checked style=\"margin-right: 8px;\">\n            <label for=\"blogger-pages\" style=\"margin-bottom: 0;\">Pages<\/label>\n          <\/div>\n          <div class=\"checkbox-item\" style=\"display: flex; align-items: center;\">\n            <input type=\"checkbox\" id=\"blogger-labels\" checked style=\"margin-right: 8px;\">\n            <label for=\"blogger-labels\" style=\"margin-bottom: 0;\">Labels<\/label>\n          <\/div>\n        <\/div>\n      <\/div>\n      \n      <div class=\"input-group\" style=\"margin-top: 20px;\">\n        <label for=\"blogger-exclude\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">Exclude URLs (comma separated)<\/label>\n        <input type=\"text\" id=\"blogger-exclude\" placeholder=\"\/p\/about.html, \/search\/label\/example\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px;\">\n      <\/div>\n    <\/div>\n    \n    <!-- HTML Options -->\n    <div id=\"html-options\" class=\"platform-options\" style=\"display: none;\">\n      <h3 style=\"color: #033676; margin-top: 0; margin-bottom: 20px;\">HTML Sitemap Settings<\/h3>\n      \n      <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px;\">\n        <div class=\"input-group\">\n          <label for=\"html-url\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">Website URL<\/label>\n          <input type=\"url\" id=\"html-url\" placeholder=\"https:\/\/yourwebsite.com\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px;\">\n        <\/div>\n      <\/div>\n      \n      <div class=\"input-group\" style=\"margin-top: 20px;\">\n        <label for=\"html-urls\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">List of URLs (one per line)<\/label>\n        <textarea id=\"html-urls\" placeholder=\"https:\/\/yourwebsite.com\/index.html\nhttps:\/\/yourwebsite.com\/about.html\nhttps:\/\/yourwebsite.com\/contact.html\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; min-height: 150px;\"><\/textarea>\n      <\/div>\n      \n      <div class=\"input-group\" style=\"margin-top: 20px;\">\n        <label for=\"html-priority\" style=\"display: block; margin-bottom: 8px; font-weight: bold; color: #033676;\">Default Priority<\/label>\n        <select id=\"html-priority\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px;\">\n          <option value=\"1.0\">1.0 &#8211; Highest<\/option>\n          <option value=\"0.8\" selected>0.8 &#8211; High<\/option>\n          <option value=\"0.5\">0.5 &#8211; Medium<\/option>\n          <option value=\"0.3\">0.3 &#8211; Low<\/option>\n          <option value=\"0.1\">0.1 &#8211; Lowest<\/option>\n        <\/select>\n      <\/div>\n    <\/div>\n    \n    <!-- Sitemap Format Selection -->\n    <div style=\"margin-top: 25px;\">\n      <h4 style=\"color: #033676; margin-bottom: 10px;\">Sitemap Format<\/h4>\n      <div style=\"display: flex; gap: 15px; flex-wrap: wrap;\">\n        <div class=\"radio-item\" style=\"display: flex; align-items: center;\">\n          <input type=\"radio\" id=\"format-xml\" name=\"sitemap-format\" value=\"xml\" checked style=\"margin-right: 8px;\">\n          <label for=\"format-xml\" style=\"margin-bottom: 0;\">XML (Standard)<\/label>\n        <\/div>\n        <div class=\"radio-item\" style=\"display: flex; align-items: center;\">\n          <input type=\"radio\" id=\"format-html\" name=\"sitemap-format\" value=\"html\" style=\"margin-right: 8px;\">\n          <label for=\"format-html\" style=\"margin-bottom: 0;\">HTML (Human-readable)<\/label>\n        <\/div>\n        <div class=\"radio-item\" style=\"display: flex; align-items: center;\">\n          <input type=\"radio\" id=\"format-txt\" name=\"sitemap-format\" value=\"txt\" style=\"margin-right: 8px;\">\n          <label for=\"format-txt\" style=\"margin-bottom: 0;\">Plain Text<\/label>\n        <\/div>\n      <\/div>\n    <\/div>\n    \n    <!-- Generate Button -->\n    <button onclick=\"generateSitemap()\" style=\"margin-top: 25px; padding: 12px; background-color: #009dff; color: white; border: none; border-radius: 5px; cursor: pointer; width: 100%; font-size: 16px; font-weight: bold;\">Generate Sitemap<\/button>\n    \n    <!-- Status Message -->\n    <div id=\"status-message\" style=\"margin-top: 20px; padding: 15px; border-radius: 5px; display: none;\"><\/div>\n    \n    <!-- Results Section -->\n    <div id=\"sitemap-results\" style=\"margin-top: 25px; display: none;\">\n      <h3 style=\"color: #033676; margin-top: 0; margin-bottom: 15px;\">Generated Sitemap<\/h3>\n      \n      <div id=\"sitemap-preview\" style=\"padding: 15px; background: #f8f8f8; border-radius: 5px; border-left: 4px solid #009dff; max-height: 400px; overflow-y: auto;\">\n        <p>Your generated sitemap will appear here.<\/p>\n      <\/div>\n      \n      <div style=\"display: flex; gap: 15px; margin-top: 20px;\">\n        <button id=\"download-btn\" style=\"padding: 12px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; flex: 1; font-weight: bold;\">Download Sitemap<\/button>\n        <button id=\"copy-btn\" style=\"padding: 12px; background-color: #2196F3; color: white; border: none; border-radius: 5px; cursor: pointer; flex: 1; font-weight: bold;\">Copy to Clipboard<\/button>\n      <\/div>\n    <\/div>\n  <\/div>\n\n  <!-- How To Use Section -->\n  <div style=\"margin-top: 30px; background-color: #e6f2ff; padding: 20px; border-radius: 8px; text-align: left;\">\n    <h3 style=\"color: #033676; margin-top: 0;\">How To Use This Sitemap Generator<\/h3>\n    <ol style=\"padding-left: 20px;\">\n      <li>Select your website platform (WordPress, Blogger, or HTML)<\/li>\n      <li>Enter your website URL and configure the options<\/li>\n      <li>Choose which content types to include in your sitemap<\/li>\n      <li>Select your preferred sitemap format (XML, HTML, or Text)<\/li>\n      <li>Click &#8220;Generate Sitemap&#8221; to create your customized sitemap<\/li>\n      <li>Download or copy the generated sitemap to use on your website<\/li>\n    <\/ol>\n  <\/div>\n\n  <!-- Features Section -->\n  <div style=\"margin-top: 20px; background-color: #e6f2ff; padding: 20px; border-radius: 8px; text-align: left;\">\n    <h3 style=\"color: #033676; margin-top: 0;\">Key Features<\/h3>\n    <ul style=\"padding-left: 20px;\">\n      <li><strong>Multiple Platforms:<\/strong> Generate sitemaps for WordPress, Blogger, and HTML websites<\/li>\n      <li><strong>Customizable Content:<\/strong> Select exactly which content types to include<\/li>\n      <li><strong>Multiple Formats:<\/strong> Create XML, HTML, or plain text sitemaps<\/li>\n      <li><strong>Exclusion Options:<\/strong> Exclude specific URLs from your sitemap<\/li>\n      <li><strong>Responsive Design:<\/strong> Works perfectly on all devices<\/li>\n      <li><strong>User-Friendly:<\/strong> Intuitive tab-based interface<\/li>\n    <\/ul>\n  <\/div>\n\n  <!-- Internal Links -->\n  <div style=\"margin-top: 30px; text-align: center;\">\n    <p style=\"font-size: 18px; color: #333; line-height: 1.6;\">\n      <strong>Explore More Tools:<\/strong><br>\n      <a href=\"#\" style=\"color: #009dff; text-decoration: none;\">About Us<\/a> | \n      <a href=\"#\" style=\"color: #009dff; text-decoration: none;\">SEO Tools<\/a> | \n      <a href=\"#\" style=\"color: #009dff; text-decoration: none;\">Contact<\/a>\n    <\/p>\n  <\/div>\n<\/div>\n\n<script>\n  \/\/ Show\/hide platform options\n  function showPlatform(platform) {\n    \/\/ Hide all platform options\n    document.querySelectorAll('.platform-options').forEach(el => {\n      el.style.display = 'none';\n    });\n    \n    \/\/ Deactivate all tabs\n    document.querySelectorAll('.platform-tab').forEach(tab => {\n      tab.style.backgroundColor = '#e0e0e0';\n      tab.style.color = '#333';\n    });\n    \n    \/\/ Show selected platform options\n    document.getElementById(`${platform}-options`).style.display = 'block';\n    \n    \/\/ Activate selected tab\n    event.target.style.backgroundColor = '#009dff';\n    event.target.style.color = 'white';\n  }\n\n  \/\/ Generate the sitemap\n  function generateSitemap() {\n    const platform = document.querySelector('.platform-tab.active').getAttribute('onclick').replace(\"showPlatform('\", \"\").replace(\"')\", \"\");\n    const format = document.querySelector('input[name=\"sitemap-format\"]:checked').value;\n    \n    \/\/ Show loading state\n    const generateBtn = document.querySelector('button[onclick=\"generateSitemap()\"]');\n    generateBtn.innerHTML = 'Generating...';\n    generateBtn.disabled = true;\n    \n    const statusMessage = document.getElementById('status-message');\n    statusMessage.style.display = 'none';\n    \n    \/\/ Simulate generation (in a real app, this would be an API call)\n    setTimeout(() => {\n      let sitemapContent = '';\n      let downloadContent = '';\n      \n      if (platform === 'wordpress') {\n        const siteUrl = document.getElementById('wp-url').value || 'https:\/\/example.com';\n        const includePosts = document.getElementById('wp-posts').checked;\n        const includePages = document.getElementById('wp-pages').checked;\n        const includeCategories = document.getElementById('wp-categories').checked;\n        const includeTags = document.getElementById('wp-tags').checked;\n        const excludeUrls = document.getElementById('wp-exclude').value.split(',').map(url => url.trim());\n        \n        if (format === 'xml') {\n          sitemapContent = generateWordPressXML(siteUrl, includePosts, includePages, includeCategories, includeTags, excludeUrls);\n          downloadContent = sitemapContent;\n        } else if (format === 'html') {\n          sitemapContent = generateWordPressHTML(siteUrl, includePosts, includePages, includeCategories, includeTags, excludeUrls);\n          downloadContent = `<html><head><title>Sitemap for ${siteUrl}<\/title><\/head><body>${sitemapContent}<\/body><\/html>`;\n        } else {\n          sitemapContent = generateWordPressText(siteUrl, includePosts, includePages, includeCategories, includeTags, excludeUrls);\n          downloadContent = sitemapContent;\n        }\n      } else if (platform === 'blogger') {\n        const siteUrl = document.getElementById('blogger-url').value || 'https:\/\/example.blogspot.com';\n        const includePosts = document.getElementById('blogger-posts').checked;\n        const includePages = document.getElementById('blogger-pages').checked;\n        const includeLabels = document.getElementById('blogger-labels').checked;\n        const excludeUrls = document.getElementById('blogger-exclude').value.split(',').map(url => url.trim());\n        \n        if (format === 'xml') {\n          sitemapContent = generateBloggerXML(siteUrl, includePosts, includePages, includeLabels, excludeUrls);\n          downloadContent = sitemapContent;\n        } else if (format === 'html') {\n          sitemapContent = generateBloggerHTML(siteUrl, includePosts, includePages, includeLabels, excludeUrls);\n          downloadContent = `<html><head><title>Sitemap for ${siteUrl}<\/title><\/head><body>${sitemapContent}<\/body><\/html>`;\n        } else {\n          sitemapContent = generateBloggerText(siteUrl, includePosts, includePages, includeLabels, excludeUrls);\n          downloadContent = sitemapContent;\n        }\n      } else {\n        const siteUrl = document.getElementById('html-url').value || 'https:\/\/example.com';\n        const urls = document.getElementById('html-urls').value.split('\\n').map(url => url.trim()).filter(url => url);\n        const priority = document.getElementById('html-priority').value;\n        \n        if (format === 'xml') {\n          sitemapContent = generateHTMLXML(siteUrl, urls, priority);\n          downloadContent = sitemapContent;\n        } else if (format === 'html') {\n          sitemapContent = generateHTMLHTML(siteUrl, urls);\n          downloadContent = `<html><head><title>Sitemap for ${siteUrl}<\/title><\/head><body>${sitemapContent}<\/body><\/html>`;\n        } else {\n          sitemapContent = generateHTMLText(urls);\n          downloadContent = sitemapContent;\n        }\n      }\n      \n      \/\/ Display the generated sitemap\n      const preview = document.getElementById('sitemap-preview');\n      if (format === 'xml') {\n        preview.innerHTML = `<pre>${escapeHtml(sitemapContent)}<\/pre>`;\n      } else {\n        preview.innerHTML = sitemapContent;\n      }\n      \n      \/\/ Show results section\n      document.getElementById('sitemap-results').style.display = 'block';\n      \n      \/\/ Store the content for download\/copy\n      document.getElementById('download-btn').setAttribute('data-content', downloadContent);\n      document.getElementById('copy-btn').setAttribute('data-content', format === 'xml' ? sitemapContent : downloadContent);\n      \n      \/\/ Reset generate button\n      generateBtn.innerHTML = 'Generate Sitemap';\n      generateBtn.disabled = false;\n      \n      \/\/ Show success message\n      statusMessage.style.display = 'block';\n      statusMessage.style.backgroundColor = 'rgba(46, 204, 113, 0.2)';\n      statusMessage.style.color = '#2ecc71';\n      statusMessage.textContent = 'Sitemap generated successfully!';\n      \n      \/\/ Scroll to results\n      document.getElementById('sitemap-results').scrollIntoView({ behavior: 'smooth' });\n    }, 1500);\n  }\n\n  \/\/ Download sitemap\n  document.getElementById('download-btn').addEventListener('click', function() {\n    const content = this.getAttribute('data-content');\n    const platform = document.querySelector('.platform-tab.active').getAttribute('onclick').replace(\"showPlatform('\", \"\").replace(\"')\", \"\");\n    const format = document.querySelector('input[name=\"sitemap-format\"]:checked').value;\n    \n    let filename = 'sitemap';\n    if (platform === 'wordpress') filename = 'wordpress-sitemap';\n    else if (platform === 'blogger') filename = 'blogger-sitemap';\n    else filename = 'html-sitemap';\n    \n    if (format === 'xml') filename += '.xml';\n    else if (format === 'html') filename += '.html';\n    else filename += '.txt';\n    \n    const blob = new Blob([content], { type: format === 'xml' ? 'application\/xml' : format === 'html' ? 'text\/html' : 'text\/plain' });\n    const url = URL.createObjectURL(blob);\n    \n    const a = document.createElement('a');\n    a.href = url;\n    a.download = filename;\n    document.body.appendChild(a);\n    a.click();\n    document.body.removeChild(a);\n    URL.revokeObjectURL(url);\n  });\n\n  \/\/ Copy sitemap to clipboard\n  document.getElementById('copy-btn').addEventListener('click', function() {\n    const content = this.getAttribute('data-content');\n    const btn = this;\n    \n    navigator.clipboard.writeText(content).then(() => {\n      const originalText = btn.textContent;\n      btn.textContent = 'Copied!';\n      setTimeout(() => {\n        btn.textContent = originalText;\n      }, 2000);\n      \n      \/\/ Show success message\n      const statusMessage = document.getElementById('status-message');\n      statusMessage.style.display = 'block';\n      statusMessage.style.backgroundColor = 'rgba(46, 204, 113, 0.2)';\n      statusMessage.style.color = '#2ecc71';\n      statusMessage.textContent = 'Sitemap copied to clipboard!';\n    }).catch(err => {\n      \/\/ Show error message\n      const statusMessage = document.getElementById('status-message');\n      statusMessage.style.display = 'block';\n      statusMessage.style.backgroundColor = 'rgba(231, 76, 60, 0.2)';\n      statusMessage.style.color = '#e74c3c';\n      statusMessage.textContent = 'Failed to copy sitemap: ' + err;\n    });\n  });\n\n  \/\/ Helper functions for generating sitemaps\n  function generateWordPressXML(siteUrl, includePosts, includePages, includeCategories, includeTags, excludeUrls) {\n    let xml = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9\">\n`;\n    \n    \/\/ Homepage\n    if (!isExcluded(siteUrl + '\/', excludeUrls)) {\n      xml += `  <url>\n    <loc>${siteUrl}\/<\/loc>\n    <lastmod>${new Date().toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>daily<\/changefreq>\n    <priority>1.0<\/priority>\n  <\/url>\n`;\n    }\n    \n    \/\/ Posts (simulated)\n    if (includePosts) {\n      for (let i = 1; i <= 5; i++) {\n        const postUrl = `${siteUrl}\/post-${i}`;\n        if (!isExcluded(postUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${postUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 86400000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>weekly<\/changefreq>\n    <priority>0.8<\/priority>\n  <\/url>\n`;\n        }\n      }\n    }\n    \n    \/\/ Pages (simulated)\n    if (includePages) {\n      const pages = ['about', 'contact', 'services', 'portfolio', 'faq'];\n      pages.forEach((page, i) => {\n        const pageUrl = `${siteUrl}\/${page}`;\n        if (!isExcluded(pageUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${pageUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 172800000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>monthly<\/changefreq>\n    <priority>0.7<\/priority>\n  <\/url>\n`;\n        }\n      });\n    }\n    \n    \/\/ Categories (simulated)\n    if (includeCategories) {\n      const categories = ['news', 'technology', 'business', 'health', 'entertainment'];\n      categories.forEach((cat, i) => {\n        const catUrl = `${siteUrl}\/category\/${cat}`;\n        if (!isExcluded(catUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${catUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 259200000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>weekly<\/changefreq>\n    <priority>0.6<\/priority>\n  <\/url>\n`;\n        }\n      });\n    }\n    \n    \/\/ Tags (simulated)\n    if (includeTags) {\n      const tags = ['wordpress', 'seo', 'webdesign', 'marketing', 'social'];\n      tags.forEach((tag, i) => {\n        const tagUrl = `${siteUrl}\/tag\/${tag}`;\n        if (!isExcluded(tagUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${tagUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 345600000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>monthly<\/changefreq>\n    <priority>0.4<\/priority>\n  <\/url>\n`;\n        }\n      });\n    }\n    \n    xml += `<\/urlset>`;\n    return xml;\n  }\n  \n  function generateWordPressHTML(siteUrl, includePosts, includePages, includeCategories, includeTags, excludeUrls) {\n    let html = `<div class=\"sitemap-container\">\n    <h2>Sitemap for ${siteUrl}<\/h2>\n    <div class=\"sitemap-section\">\n        <h3>Homepage<\/h3>\n        <div class=\"sitemap-item\">\n            <a href=\"${siteUrl}\/\" class=\"sitemap-url\">${siteUrl}\/<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date().toLocaleDateString()}<\/div>\n        <\/div>\n    <\/div>`;\n    \n    \/\/ Posts\n    if (includePosts) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Posts<\/h3>`;\n      \n      for (let i = 1; i <= 5; i++) {\n        const postUrl = `${siteUrl}\/post-${i}`;\n        if (!isExcluded(postUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${postUrl}\" class=\"sitemap-url\">Post ${i}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 86400000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      }\n      \n      html += `\n    <\/div>`;\n    }\n    \n    \/\/ Pages\n    if (includePages) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Pages<\/h3>`;\n      \n      const pages = ['About', 'Contact', 'Services', 'Portfolio', 'FAQ'];\n      pages.forEach((page, i) => {\n        const pageUrl = `${siteUrl}\/${page.toLowerCase()}`;\n        if (!isExcluded(pageUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${pageUrl}\" class=\"sitemap-url\">${page}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 172800000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      });\n      \n      html += `\n    <\/div>`;\n    }\n    \n    \/\/ Categories\n    if (includeCategories) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Categories<\/h3>`;\n      \n      const categories = ['News', 'Technology', 'Business', 'Health', 'Entertainment'];\n      categories.forEach((cat, i) => {\n        const catUrl = `${siteUrl}\/category\/${cat.toLowerCase()}`;\n        if (!isExcluded(catUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${catUrl}\" class=\"sitemap-url\">${cat}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 259200000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      });\n      \n      html += `\n    <\/div>`;\n    }\n    \n    \/\/ Tags\n    if (includeTags) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Tags<\/h3>`;\n      \n      const tags = ['WordPress', 'SEO', 'Web Design', 'Marketing', 'Social Media'];\n      tags.forEach((tag, i) => {\n        const tagUrl = `${siteUrl}\/tag\/${tag.toLowerCase().replace(' ', '-')}`;\n        if (!isExcluded(tagUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${tagUrl}\" class=\"sitemap-url\">${tag}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 345600000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      });\n      \n      html += `\n    <\/div>`;\n    }\n    \n    html += `\n<\/div>`;\n    return html;\n  }\n  \n  function generateWordPressText(siteUrl, includePosts, includePages, includeCategories, includeTags, excludeUrls) {\n    let text = `Sitemap for ${siteUrl}\\n\\n`;\n    text += `Homepage:\\n${siteUrl}\/\\n\\n`;\n    \n    \/\/ Posts\n    if (includePosts) {\n      text += `Posts:\\n`;\n      for (let i = 1; i <= 5; i++) {\n        const postUrl = `${siteUrl}\/post-${i}`;\n        if (!isExcluded(postUrl, excludeUrls)) {\n          text += `${postUrl}\\n`;\n        }\n      }\n      text += `\\n`;\n    }\n    \n    \/\/ Pages\n    if (includePages) {\n      text += `Pages:\\n`;\n      const pages = ['about', 'contact', 'services', 'portfolio', 'faq'];\n      pages.forEach(page => {\n        const pageUrl = `${siteUrl}\/${page}`;\n        if (!isExcluded(pageUrl, excludeUrls)) {\n          text += `${pageUrl}\\n`;\n        }\n      });\n      text += `\\n`;\n    }\n    \n    \/\/ Categories\n    if (includeCategories) {\n      text += `Categories:\\n`;\n      const categories = ['news', 'technology', 'business', 'health', 'entertainment'];\n      categories.forEach(cat => {\n        const catUrl = `${siteUrl}\/category\/${cat}`;\n        if (!isExcluded(catUrl, excludeUrls)) {\n          text += `${catUrl}\\n`;\n        }\n      });\n      text += `\\n`;\n    }\n    \n    \/\/ Tags\n    if (includeTags) {\n      text += `Tags:\\n`;\n      const tags = ['wordpress', 'seo', 'webdesign', 'marketing', 'social'];\n      tags.forEach(tag => {\n        const tagUrl = `${siteUrl}\/tag\/${tag}`;\n        if (!isExcluded(tagUrl, excludeUrls)) {\n          text += `${tagUrl}\\n`;\n        }\n      });\n      text += `\\n`;\n    }\n    \n    return text;\n  }\n  \n  function generateBloggerXML(siteUrl, includePosts, includePages, includeLabels, excludeUrls) {\n    let xml = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9\">\n`;\n    \n    \/\/ Homepage\n    if (!isExcluded(siteUrl + '\/', excludeUrls)) {\n      xml += `  <url>\n    <loc>${siteUrl}\/<\/loc>\n    <lastmod>${new Date().toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>daily<\/changefreq>\n    <priority>1.0<\/priority>\n  <\/url>\n`;\n    }\n    \n    \/\/ Posts (simulated)\n    if (includePosts) {\n      for (let i = 1; i <= 5; i++) {\n        const postUrl = `${siteUrl}\/2023\/01\/post-${i}.html`;\n        if (!isExcluded(postUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${postUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 86400000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>weekly<\/changefreq>\n    <priority>0.8<\/priority>\n  <\/url>\n`;\n        }\n      }\n    }\n    \n    \/\/ Pages (simulated)\n    if (includePages) {\n      const pages = ['about', 'contact', 'privacy-policy', 'disclaimer'];\n      pages.forEach((page, i) => {\n        const pageUrl = `${siteUrl}\/p\/${page}.html`;\n        if (!isExcluded(pageUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${pageUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 172800000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>monthly<\/changefreq>\n    <priority>0.7<\/priority>\n  <\/url>\n`;\n        }\n      });\n    }\n    \n    \/\/ Labels (simulated)\n    if (includeLabels) {\n      const labels = ['technology', 'travel', 'food', 'lifestyle', 'fashion'];\n      labels.forEach((label, i) => {\n        const labelUrl = `${siteUrl}\/search\/label\/${label}`;\n        if (!isExcluded(labelUrl, excludeUrls)) {\n          xml += `  <url>\n    <loc>${labelUrl}<\/loc>\n    <lastmod>${new Date(Date.now() - i * 259200000).toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>weekly<\/changefreq>\n    <priority>0.6<\/priority>\n  <\/url>\n`;\n        }\n      });\n    }\n    \n    xml += `<\/urlset>`;\n    return xml;\n  }\n  \n  function generateBloggerHTML(siteUrl, includePosts, includePages, includeLabels, excludeUrls) {\n    let html = `<div class=\"sitemap-container\">\n    <h2>Sitemap for ${siteUrl}<\/h2>\n    <div class=\"sitemap-section\">\n        <h3>Homepage<\/h3>\n        <div class=\"sitemap-item\">\n            <a href=\"${siteUrl}\/\" class=\"sitemap-url\">${siteUrl}\/<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date().toLocaleDateString()}<\/div>\n        <\/div>\n    <\/div>`;\n    \n    \/\/ Posts\n    if (includePosts) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Posts<\/h3>`;\n      \n      for (let i = 1; i <= 5; i++) {\n        const postUrl = `${siteUrl}\/2023\/01\/post-${i}.html`;\n        if (!isExcluded(postUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${postUrl}\" class=\"sitemap-url\">Post ${i}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 86400000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      }\n      \n      html += `\n    <\/div>`;\n    }\n    \n    \/\/ Pages\n    if (includePages) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Pages<\/h3>`;\n      \n      const pages = ['About', 'Contact', 'Privacy Policy', 'Disclaimer'];\n      pages.forEach((page, i) => {\n        const pageUrl = `${siteUrl}\/p\/${page.toLowerCase().replace(' ', '-')}.html`;\n        if (!isExcluded(pageUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${pageUrl}\" class=\"sitemap-url\">${page}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 172800000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      });\n      \n      html += `\n    <\/div>`;\n    }\n    \n    \/\/ Labels\n    if (includeLabels) {\n      html += `\n    <div class=\"sitemap-section\">\n        <h3>Labels<\/h3>`;\n      \n      const labels = ['Technology', 'Travel', 'Food', 'Lifestyle', 'Fashion'];\n      labels.forEach((label, i) => {\n        const labelUrl = `${siteUrl}\/search\/label\/${label.toLowerCase()}`;\n        if (!isExcluded(labelUrl, excludeUrls)) {\n          html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${labelUrl}\" class=\"sitemap-url\">${label}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 259200000).toLocaleDateString()}<\/div>\n        <\/div>`;\n        }\n      });\n      \n      html += `\n    <\/div>`;\n    }\n    \n    html += `\n<\/div>`;\n    return html;\n  }\n  \n  function generateBloggerText(siteUrl, includePosts, includePages, includeLabels, excludeUrls) {\n    let text = `Sitemap for ${siteUrl}\\n\\n`;\n    text += `Homepage:\\n${siteUrl}\/\\n\\n`;\n    \n    \/\/ Posts\n    if (includePosts) {\n      text += `Posts:\\n`;\n      for (let i = 1; i <= 5; i++) {\n        const postUrl = `${siteUrl}\/2023\/01\/post-${i}.html`;\n        if (!isExcluded(postUrl, excludeUrls)) {\n          text += `${postUrl}\\n`;\n        }\n      }\n      text += `\\n`;\n    }\n    \n    \/\/ Pages\n    if (includePages) {\n      text += `Pages:\\n`;\n      const pages = ['about', 'contact', 'privacy-policy', 'disclaimer'];\n      pages.forEach(page => {\n        const pageUrl = `${siteUrl}\/p\/${page}.html`;\n        if (!isExcluded(pageUrl, excludeUrls)) {\n          text += `${pageUrl}\\n`;\n        }\n      });\n      text += `\\n`;\n    }\n    \n    \/\/ Labels\n    if (includeLabels) {\n      text += `Labels:\\n`;\n      const labels = ['technology', 'travel', 'food', 'lifestyle', 'fashion'];\n      labels.forEach(label => {\n        const labelUrl = `${siteUrl}\/search\/label\/${label}`;\n        if (!isExcluded(labelUrl, excludeUrls)) {\n          text += `${labelUrl}\\n`;\n        }\n      });\n      text += `\\n`;\n    }\n    \n    return text;\n  }\n  \n  function generateHTMLXML(siteUrl, urls, priority) {\n    let xml = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9\">\n`;\n    \n    \/\/ Homepage if not already in the list\n    const homepage = siteUrl.endsWith('\/') ? siteUrl : siteUrl + '\/';\n    if (!urls.includes(homepage)) {\n      xml += `  <url>\n    <loc>${homepage}<\/loc>\n    <lastmod>${new Date().toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>daily<\/changefreq>\n    <priority>1.0<\/priority>\n  <\/url>\n`;\n    }\n    \n    \/\/ Other URLs\n    urls.forEach(url => {\n      if (url !== homepage) {\n        xml += `  <url>\n    <loc>${url}<\/loc>\n    <lastmod>${new Date().toISOString().split('T')[0]}<\/lastmod>\n    <changefreq>weekly<\/changefreq>\n    <priority>${priority}<\/priority>\n  <\/url>\n`;\n      }\n    });\n    \n    xml += `<\/urlset>`;\n    return xml;\n  }\n  \n  function generateHTMLHTML(siteUrl, urls) {\n    let html = `<div class=\"sitemap-container\">\n    <h2>Sitemap for ${siteUrl}<\/h2>\n    <div class=\"sitemap-section\">\n        <h3>All Pages<\/h3>`;\n    \n    \/\/ Homepage if not already in the list\n    const homepage = siteUrl.endsWith('\/') ? siteUrl : siteUrl + '\/';\n    if (!urls.includes(homepage)) {\n      html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${homepage}\" class=\"sitemap-url\">Homepage<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date().toLocaleDateString()}<\/div>\n        <\/div>`;\n    }\n    \n    \/\/ Other URLs\n    urls.forEach((url, i) => {\n      if (url !== homepage) {\n        const pageName = url.split('\/').filter(part => part).pop() || url;\n        html += `\n        <div class=\"sitemap-item\">\n            <a href=\"${url}\" class=\"sitemap-url\">${pageName}<\/a>\n            <div class=\"lastmod\">Last updated: ${new Date(Date.now() - i * 86400000).toLocaleDateString()}<\/div>\n        <\/div>`;\n      }\n    });\n    \n    html += `\n    <\/div>\n<\/div>`;\n    return html;\n  }\n  \n  function generateHTMLText(urls) {\n    let text = `Sitemap\\n\\n`;\n    text += `All Pages:\\n`;\n    urls.forEach(url => {\n      text += `${url}\\n`;\n    });\n    return text;\n  }\n  \n  function isExcluded(url, excludeUrls) {\n    if (!excludeUrls || excludeUrls.length === 0) return false;\n    \n    \/\/ Check if the URL matches any of the excluded patterns\n    return excludeUrls.some(excluded => {\n      if (!excluded) return false;\n      \n      \/\/ Simple check - in a real app you'd want more sophisticated pattern matching\n      return url.includes(excluded);\n    });\n  }\n  \n  function escapeHtml(unsafe) {\n    return unsafe\n      .replace(\/&\/g, \"&amp;\")\n      .replace(\/<\/g, \"&lt;\")\n      .replace(\/>\/g, \"&gt;\")\n      .replace(\/\"\/g, \"&quot;\")\n      .replace(\/'\/g, \"&#039;\");\n  }\n<\/script>\n<img src=\"https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1.webp\" class=\"ss-hidden-pin-image\" alt=\"\" data-pin-url=\"https:\/\/toolsblaster.com\/?p=1122\" data-pin-media=\"https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1.webp\" data-pin-description=\"Advanced Best Sitemap Generator\"\/>","protected":false},"excerpt":{"rendered":"<p>Advanced Sitemap Generator Generate professional sitemaps for WordPress, Blogger, and HTML websites with detailed options WordPress Blogger HTML WordPress Sitemap Settings WordPress Site URL Include in Sitemap: Posts Pages Categories&hellip;<\/p>\n<img src=\"https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1.webp\" class=\"ss-hidden-pin-image\" alt=\"\" data-pin-url=\"https:\/\/toolsblaster.com\/?p=1122\" data-pin-media=\"https:\/\/toolsblaster.com\/wp-content\/uploads\/2025\/03\/Sitemaps-Generator-1.webp\" data-pin-description=\"Advanced Best Sitemap Generator\"\/>","protected":false},"author":1,"featured_media":1183,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowgIyDCw:productID":"","_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-1122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo-tools"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/posts\/1122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1122"}],"version-history":[{"count":4,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/posts\/1122\/revisions"}],"predecessor-version":[{"id":1748,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/posts\/1122\/revisions\/1748"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=\/wp\/v2\/media\/1183"}],"wp:attachment":[{"href":"https:\/\/toolsblaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/toolsblaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}