• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Genesis Template To Display Posts by Year

This file enables you to create a custom archive page template in genesis which dislays posts by date. In this case, by year.

You can use this code in a new template file for each year or create multiple loops for each year in the same file.

Based on this question from the community :

I created a custom archive template however i would like to automatically create multiple pages. Maybe by year, so each year is its own page.

Note : The code does not include pagination or genesis hooks which output the default markup. You can add them or use the genesis_custom_loop function instead of a new WP_Query.

Related Code Snippets

  • Genesis Yearly Template To List All Posts For Each Month In a Responsive Grid
  • Show Posts Between Specific Date Period

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems