Site Map Page Template

Posts Display Function

The ‘avp_get_posts()’ function gets a list of all posts and sorts them by year, month and day and displays them in that order as hierarchical lists. The function is simply a series of embedded loops for the year, month, day and post lists. As such, it mirrors the Page hierarchical listing displayed beside it. Visually, it is very similar to the way Pages are displayed, which is the reason it was implemented in this manner.

The function is based on an example at WPSnipp, massaged a little to add sorting by the day as well.

Share
The short URL of the present article is: http://www.terryobrien.me/1i3n4

Page 4 of 5
First | Prev | 1 | 2 | 3 | 4 | 5 | Next | Last
View All