{"id":5265,"date":"2009-11-19T12:30:59","date_gmt":"2009-11-19T21:30:59","guid":{"rendered":"http:\/\/www.rosalindgardner.com\/blog\/?p=5265"},"modified":"2022-11-18T16:16:35","modified_gmt":"2022-11-19T00:16:35","slug":"create-a-unique-site-map-for-your-wordpress-blog","status":"publish","type":"post","link":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/","title":{"rendered":"Create a Unique Site Map for Your WordPress Blog"},"content":{"rendered":"<p>Daniel recently asked the following question about the site map created for use on this blog:<img decoding=\"async\" style=\"float: right; padding: 0px 0px 10px 10px\" src=\"https:\/\/rosalindgardner.com\/images\/300-map.png\" border=\"0\" alt=\"\" \/><\/p>\n<h3>I have a question about your blog's sitemap. Was it created manually or by using some type of automated system or generator? Cause if I can, I'd like to create one for my website? Please advise. I'd appreciate it. Thanks in advance!<\/h3>\n<p>The site map on this blog was created with some minor manual modifications to the default one that came with the <a href=\"https:\/\/rosalindgardner.com\/blog\/studiopress\" target=\"_blank\" rel=\"noopener noreferrer\">StudioPress theme<\/a>, a file named page-archive.php.<\/p>\n<p>The\u00c2\u00a0site map that comes with the default WordPress theme is called the Archive Page Template and the file is named archives.php.<\/p>\n<p>Here is the coding in the default WordPress template.<\/p>\n<blockquote><p>&lt;?php<br \/>\n\/**<br \/>\n* @package WordPress<br \/>\n* @subpackage Default_Theme<br \/>\n*\/<br \/>\n\/*<br \/>\nTemplate Name: Archives<br \/>\n*\/<br \/>\n?&gt;<\/p>\n<p>&lt;?php get_header(); ?&gt;<\/p>\n<p>&lt;div id=&#8221;content&#8221;&gt;<\/p>\n<p>&lt;?php get_search_form(); ?&gt;<\/p>\n<p>&lt;h2&gt;Archives by Month:&lt;\/h2&gt;<br \/>\n&lt;ul&gt;<br \/>\n&lt;?php wp_get_archives(&#8216;type=monthly'); ?&gt;<br \/>\n&lt;\/ul&gt;<\/p>\n<p>&lt;h2&gt;Archives by Subject:&lt;\/h2&gt;<br \/>\n&lt;ul&gt;<br \/>\n&lt;?php wp_list_categories(); ?&gt;<br \/>\n&lt;\/ul&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;?php get_footer(); ?&gt;<\/p><\/blockquote>\n<p>Here is the coding for the current NPT site map, named site-map.php. Coding\u00c2\u00a0 will be deciphered later in this post.<\/p>\n<blockquote><p>&lt;?php<br \/>\n\/*<br \/>\n<strong>Template Name: Site Map<\/strong><br \/>\n*\/<br \/>\n?&gt;<\/p>\n<p>&lt;?php get_header(); ?&gt;<\/p>\n<p>&lt;div id=&#8221;content&#8221;&gt;<\/p>\n<p>&lt;div id=&#8221;contentleft&#8221;&gt;<\/p>\n<p>&lt;div&gt;<\/p>\n<p>&lt;?php include(TEMPLATEPATH.&#8221;\/breadcrumb.php&#8221;);?&gt;<br \/>\n&lt;h1&gt;&lt;img src=&#8221;https:\/\/rosalindgardner.com\/images\/300-map.png&#8221;\u00c2\u00a0\u00c2\u00a0 style=&#8221;float: right; padding: 0px 0px 10px 10px&#8221;\u00c2\u00a0 border=&#8221;0&#8243;&gt;Archives and Site Map&lt;\/h1&gt;<br \/>\n&lt;h2&gt;<strong>Main Pages<\/strong>&lt;\/h2&gt;<br \/>\n&lt;ul&gt;<br \/>\n&lt;?php wp_list_pages(&#8216;title_li=&depth=2&exclude=2938,1683'); ?&gt;<br \/>\n&lt;\/ul&gt;<br \/>\n&lt;h2&gt;<strong>Popular Posts<\/strong>&lt;\/h2&gt;<br \/>\n&lt;ul&gt;<br \/>\n&lt;li&gt;<br \/>\n&lt;?php wp_list_bookmarks(&#8216;title_li=&categorize=0&category=831'); ?&gt;<br \/>\n&lt;\/li&gt;<\/p>\n<p>&lt;\/ul&gt;<\/p>\n<p>&lt;hr&gt;<br \/>\n&lt;h2&gt;<strong>Last 25 Posts<\/strong>&lt;\/h2&gt;<br \/>\n&lt;ul&gt;<br \/>\n&lt;?php wp_get_archives(&#8216;type=postbypost&limit=25'); ?&gt;<br \/>\n&lt;\/ul&gt;<\/p>\n<p>&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;<\/p>\n<p>&lt;?php include(TEMPLATEPATH.&#8221;\/sidebar.php&#8221;);?&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;!&#8211; The main column ends\u00c2\u00a0 &#8211;&gt;<\/p>\n<p>&lt;?php get_footer(); ?&gt;<\/p><\/blockquote>\n<h3>Main Pages<\/h3>\n<p>To list all the pages on your blog, you would use the code:<\/p>\n<blockquote>\n<pre>&lt;?php wp_list_pages('title_li=');\u00c2\u00a0?&gt;<\/pre>\n<\/blockquote>\n<p>Because I wanted to show subpages (depth) and not show (exclude) others, I used the following code:<\/p>\n<blockquote><p>&lt;?php wp_list_pages(&#8216;title_li=&depth=2&exclude=2938,1683');<\/p><\/blockquote>\n<p>depth=2 specifies that I want the subpages to show 2 levels deep.<\/p>\n<p>For more information about visit the <a href=\"http:\/\/codex.wordpress.org\/Template_Tags\/wp_list_pages\" target=\"_blank\" rel=\"noopener noreferrer\">Template Tags\/wp list pages<\/a> page on the WordPress Codex.<\/p>\n<h3>Popular Posts<\/h3>\n<p>The list of most popular posts is generated by a links (bookmarks) list, all filed under the &#8216;Popular' category, numbered 831.<\/p>\n<blockquote><p><code>&lt;?php wp_list_bookmarks('title_li=&categorize=0&category=831'); ?&gt;<\/code><\/p><\/blockquote>\n<p>For more information about the coding used to display bookmarks, see <a href=\"http:\/\/codex.wordpress.org\/wp_list_bookmarks\" target=\"_blank\" rel=\"noopener noreferrer\">Template Tags\/wp list bookmarks<\/a> on the Codex.<\/p>\n<h3>Last 25 Posts<\/h3>\n<p>To create a list of the most recent 25 posts, I use the following code.<\/p>\n<blockquote><p>&lt;?php wp_get_archives(&#8216;type=postbypost&limit=25'); ?&gt;<\/p><\/blockquote>\n<p>To learn more about coding bookmarks lists visit <a href=\"http:\/\/codex.wordpress.org\/Template_Tags\/wp_get_archives\" target=\"_blank\" rel=\"noopener noreferrer\">Template Tags\/wp get archives<\/a> on the WordPress Codes.<\/p>\n<p>Or, you could always just use a <a href=\"http:\/\/wordpress.org\/extend\/plugins\/google-sitemap-generator\/\" target=\"_blank\" rel=\"noopener noreferrer\">site map plugin<\/a>, but you won't have the same latitude as you do when you hardcode the template. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Daniel recently asked the following question about the site map created for use on this blog: I have a question about your blog&#8217;s sitemap. Was it created manually or by using some type of automated system or generator? Cause if I can, I&#8217;d like to create one for my website? Please advise. I&#8217;d appreciate it. [&hellip;]<\/p>\n","protected":false},"author":577,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1222],"tags":[417,1156,1157,980,830,1019,77],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create a Unique Site Map for Your Wordpress Blog - RosalindGardner.com<\/title>\n<meta name=\"description\" content=\"Daniel recently asked the following question about WordPress blog site maps, and the site map created for use on this blog in particular\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Unique Site Map for Your Wordpress Blog - RosalindGardner.com\" \/>\n<meta property=\"og:description\" content=\"Daniel recently asked the following question about WordPress blog site maps, and the site map created for use on this blog in particular\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/\" \/>\n<meta property=\"og:site_name\" content=\"RosalindGardner.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RosalindGardnerOnline?ref=hl\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/RosalindGardnerOnline\" \/>\n<meta property=\"article:published_time\" content=\"2009-11-19T21:30:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-19T00:16:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rosalindgardner.com\/images\/300-map.png\" \/>\n<meta name=\"author\" content=\"Rosalind Gardner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosalindgardner\" \/>\n<meta name=\"twitter:site\" content=\"@rosalindgardner\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rosalind Gardner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/\",\"url\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/\",\"name\":\"Create a Unique Site Map for Your Wordpress Blog - RosalindGardner.com\",\"isPartOf\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rosalindgardner.com\/images\/300-map.png\",\"datePublished\":\"2009-11-19T21:30:59+00:00\",\"dateModified\":\"2022-11-19T00:16:35+00:00\",\"author\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f\"},\"description\":\"Daniel recently asked the following question about WordPress blog site maps, and the site map created for use on this blog in particular\",\"breadcrumb\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#primaryimage\",\"url\":\"https:\/\/rosalindgardner.com\/images\/300-map.png\",\"contentUrl\":\"https:\/\/rosalindgardner.com\/images\/300-map.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rosalindgardner.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Unique Site Map for Your WordPress Blog\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#website\",\"url\":\"https:\/\/rosalindgardner.com\/blog\/\",\"name\":\"RosalindGardner.com\",\"description\":\"Learn Blogging &amp; Affiliate Marketing with Rosalind Gardner\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rosalindgardner.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f\",\"name\":\"Rosalind Gardner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g\",\"caption\":\"Rosalind Gardner\"},\"description\":\"Super affiliate, blogger, and speaker, Rosalind is best known for her affiliate marketing training in the Super Affiliate Handbook: How I made $436,797 in One Year Selling Other Peoples' Stuff Online. You can connect with her on Facebook.\",\"sameAs\":[\"https:\/\/rosalindgardner.com\/blog\/sah\",\"https:\/\/www.facebook.com\/RosalindGardnerOnline\",\"https:\/\/www.pinterest.ca\/rosalindgardner\/\",\"https:\/\/x.com\/rosalindgardner\",\"https:\/\/www.youtube.com\/user\/rosalindgardner\"],\"url\":\"https:\/\/rosalindgardner.com\/blog\/author\/rosalindgardner\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a Unique Site Map for Your Wordpress Blog - RosalindGardner.com","description":"Daniel recently asked the following question about WordPress blog site maps, and the site map created for use on this blog in particular","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/","og_locale":"en_US","og_type":"article","og_title":"Create a Unique Site Map for Your Wordpress Blog - RosalindGardner.com","og_description":"Daniel recently asked the following question about WordPress blog site maps, and the site map created for use on this blog in particular","og_url":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/","og_site_name":"RosalindGardner.com","article_publisher":"https:\/\/www.facebook.com\/RosalindGardnerOnline?ref=hl","article_author":"https:\/\/www.facebook.com\/RosalindGardnerOnline","article_published_time":"2009-11-19T21:30:59+00:00","article_modified_time":"2022-11-19T00:16:35+00:00","og_image":[{"url":"https:\/\/rosalindgardner.com\/images\/300-map.png"}],"author":"Rosalind Gardner","twitter_card":"summary_large_image","twitter_creator":"@rosalindgardner","twitter_site":"@rosalindgardner","twitter_misc":{"Written by":"Rosalind Gardner","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/","url":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/","name":"Create a Unique Site Map for Your Wordpress Blog - RosalindGardner.com","isPartOf":{"@id":"https:\/\/rosalindgardner.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#primaryimage"},"image":{"@id":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#primaryimage"},"thumbnailUrl":"https:\/\/rosalindgardner.com\/images\/300-map.png","datePublished":"2009-11-19T21:30:59+00:00","dateModified":"2022-11-19T00:16:35+00:00","author":{"@id":"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f"},"description":"Daniel recently asked the following question about WordPress blog site maps, and the site map created for use on this blog in particular","breadcrumb":{"@id":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#primaryimage","url":"https:\/\/rosalindgardner.com\/images\/300-map.png","contentUrl":"https:\/\/rosalindgardner.com\/images\/300-map.png"},{"@type":"BreadcrumbList","@id":"https:\/\/rosalindgardner.com\/blog\/create-a-unique-site-map-for-your-wordpress-blog\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rosalindgardner.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a Unique Site Map for Your WordPress Blog"}]},{"@type":"WebSite","@id":"https:\/\/rosalindgardner.com\/blog\/#website","url":"https:\/\/rosalindgardner.com\/blog\/","name":"RosalindGardner.com","description":"Learn Blogging &amp; Affiliate Marketing with Rosalind Gardner","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rosalindgardner.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f","name":"Rosalind Gardner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g","caption":"Rosalind Gardner"},"description":"Super affiliate, blogger, and speaker, Rosalind is best known for her affiliate marketing training in the Super Affiliate Handbook: How I made $436,797 in One Year Selling Other Peoples' Stuff Online. You can connect with her on Facebook.","sameAs":["https:\/\/rosalindgardner.com\/blog\/sah","https:\/\/www.facebook.com\/RosalindGardnerOnline","https:\/\/www.pinterest.ca\/rosalindgardner\/","https:\/\/x.com\/rosalindgardner","https:\/\/www.youtube.com\/user\/rosalindgardner"],"url":"https:\/\/rosalindgardner.com\/blog\/author\/rosalindgardner\/"}]}},"_links":{"self":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/posts\/5265"}],"collection":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/users\/577"}],"replies":[{"embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/comments?post=5265"}],"version-history":[{"count":0,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/posts\/5265\/revisions"}],"wp:attachment":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/media?parent=5265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/categories?post=5265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/tags?post=5265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}