{"id":1036,"date":"2010-02-22T16:09:11","date_gmt":"2010-02-22T06:09:11","guid":{"rendered":"https:\/\/eisabainyo.net\/weblog\/?p=1036"},"modified":"2010-02-27T10:16:54","modified_gmt":"2010-02-27T00:16:54","slug":"how-to-create-a-archive-page-in-wordpress","status":"publish","type":"post","link":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/","title":{"rendered":"5 steps to creating a custom Archive page in WordPress"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif\" alt=\"\" title=\"Archive\" width=\"301\" height=\"468\" class=\"alignnone size-full wp-image-1108\" srcset=\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif 301w, https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page-192x300.gif 192w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><br \/>\nHere is how to create a custom archive page in WordPress just like <a href=\"https:\/\/eisabainyo.net\/weblog\/archive\/\">the one<\/a> you see on our blog.  <\/p>\n<p>1. Go to the current theme folder of your WordPress installation (wp-content\/themes\/*current theme*) and make sure you don't already have archives.php in the folder<\/p>\n<p>2. Create a new file called archives.php (or whatever file name you want to give)<\/p>\n<p>3. Copy and paste the following code into the new file and upload it to your current theme folder (wp-content\/themes\/*current theme*)<\/p>\n<pre>\r\n&lt;?php\r\n\/*\r\nTemplate Name: Archives Page\r\n*\/\r\n?&gt;\r\n\r\n&lt;?php get_header(); ?&gt;\r\n\r\n&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;\r\n&lt;div class=&quot;post-page&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;\r\n&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;\/h1&gt;\r\n&lt;?php the_content('&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;\/p&gt;'); ?&gt;\r\n\r\n&lt;h2&gt;Archives by Title:&lt;\/h2&gt;\r\n&lt;ul&gt;\r\n    &lt;?php wp_get_archives('type=alpha');?&gt;\r\n&lt;\/ul&gt;\r\n\r\n&lt;h2&gt;Archives by Month:&lt;\/h2&gt;\r\n&lt;ul&gt;\r\n    &lt;?php wp_get_archives('type=monthly'); ?&gt;\r\n&lt;\/ul&gt;\r\n\r\n&lt;h2&gt;Archives by Subject:&lt;\/h2&gt;\r\n&lt;ul&gt;\r\n    &lt;?php wp_list_categories('title_li='); ?&gt;\r\n&lt;\/ul&gt;\r\n\r\n&lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;\/strong&gt; ', 'after' =&gt; '&lt;\/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;\r\n&lt;\/div&gt;\r\n&lt;?php endwhile; endif; ?&gt;\r\n\r\n&lt;?php get_footer(); ?&gt;\r\n<\/pre>\n<p>Note: You will probably need to modify this code a bit to match the code structure of your current theme.  For example, you might need to have get_sidebar() or you might have extra markup.  <\/p>\n<p>4. Login to your WordPress Administrator Panel and create a new page (and name it whatever you like.  Ours is called \"Archive\")<\/p>\n<p>5. On the right side of the create\/edit page, you will see Attributes section where you can specify settings for Parent, Template and Order.  Choose \"Archives Page\" for Template and publish\/save your changes.  <\/p>\n<p>You now have an Archive page for your WordPress blog that is similar to <a href=\"https:\/\/eisabainyo.net\/weblog\/archive\/\">our Archive page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is how to create a custom archive page in WordPress just like the one<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11,4],"tags":[],"class_list":["post-1036","post","type-post","status-publish","format-standard","hentry","category-snippets","category-tutorials","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>5 steps to creating a custom Archive page in WordPress | Tech Leadership Advice &amp; Resources<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 steps to creating a custom Archive page in WordPress | Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"og:description\" content=\"Here is how to create a custom archive page in WordPress just like the one\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"article:published_time\" content=\"2010-02-22T06:09:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2010-02-27T00:16:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif\" \/>\n<meta name=\"author\" content=\"Isabel Nyo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Isabel Nyo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\"},\"author\":{\"name\":\"Isabel Nyo\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"headline\":\"5 steps to creating a custom Archive page in WordPress\",\"datePublished\":\"2010-02-22T06:09:11+00:00\",\"dateModified\":\"2010-02-27T00:16:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\"},\"wordCount\":200,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"image\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif\",\"articleSection\":[\"Snippets\",\"Tutorials\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\",\"name\":\"5 steps to creating a custom Archive page in WordPress | Tech Leadership Advice &amp; Resources\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif\",\"datePublished\":\"2010-02-22T06:09:11+00:00\",\"dateModified\":\"2010-02-27T00:16:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif\",\"contentUrl\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif\",\"width\":\"301\",\"height\":\"468\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eisabainyo.net\/weblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 steps to creating a custom Archive page in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/\",\"name\":\"Career Resources for Professionals in Tech\",\"description\":\"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors\",\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\",\"name\":\"Isabel Nyo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"caption\":\"Isabel Nyo\"},\"logo\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\"},\"description\":\"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more..\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"5 steps to creating a custom Archive page in WordPress | Tech Leadership Advice &amp; Resources","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:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"5 steps to creating a custom Archive page in WordPress | Tech Leadership Advice &amp; Resources","og_description":"Here is how to create a custom archive page in WordPress just like the one","og_url":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/","og_site_name":"Tech Leadership Advice &amp; Resources","article_published_time":"2010-02-22T06:09:11+00:00","article_modified_time":"2010-02-27T00:16:54+00:00","og_image":[{"url":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif","type":"","width":"","height":""}],"author":"Isabel Nyo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Isabel Nyo","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/"},"author":{"name":"Isabel Nyo","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"headline":"5 steps to creating a custom Archive page in WordPress","datePublished":"2010-02-22T06:09:11+00:00","dateModified":"2010-02-27T00:16:54+00:00","mainEntityOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/"},"wordCount":200,"commentCount":7,"publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"image":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif","articleSection":["Snippets","Tutorials","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/","url":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/","name":"5 steps to creating a custom Archive page in WordPress | Tech Leadership Advice &amp; Resources","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif","datePublished":"2010-02-22T06:09:11+00:00","dateModified":"2010-02-27T00:16:54+00:00","breadcrumb":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#primaryimage","url":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif","contentUrl":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2010\/02\/archive-page.gif","width":"301","height":"468"},{"@type":"BreadcrumbList","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/02\/22\/how-to-create-a-archive-page-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eisabainyo.net\/weblog\/"},{"@type":"ListItem","position":2,"name":"5 steps to creating a custom Archive page in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/eisabainyo.net\/weblog\/#website","url":"https:\/\/eisabainyo.net\/weblog\/","name":"Career Resources for Professionals in Tech","description":"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors","publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab","name":"Isabel Nyo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","caption":"Isabel Nyo"},"logo":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/"},"description":"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more.."}]}},"_links":{"self":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/1036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/comments?post=1036"}],"version-history":[{"count":11,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/1036\/revisions"}],"predecessor-version":[{"id":1109,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/1036\/revisions\/1109"}],"wp:attachment":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/media?parent=1036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/categories?post=1036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/tags?post=1036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}