I have several subpages, a constantly growing list, all under one subpage. I want that page to be an archive page that links to all of them, and I've tried dozens of versions of code and I can't get the links to sort in the order of most recent to oldest--only oldest first.
And, when I do sort by date, I get this weird glitch where the word "Pages" comes up in the upper left corner, plain black lettering and overlapping my column---the same code, without being organized by date does not cause this glitch.
Here are a couple things I've tried:
'
-
<?php wp_list_pages('sort_column=post_date&show_date=created'); ?>
-----------------
'<?php
if($post->post_parent)
$children = wp_list_pages("sort_column=menu_order&title_li=&child_of=".$post->post_parent."&echo=0"); else
$children = wp_list_pages("sort_column=menu_order&title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
-
<?php echo $children; ?>
<?php } ?>'
I've linked to two images, both are using the second set of code. The first image is using the menu_order and title parameter for sort column, the second is using the menu_order and post_date parameter for sort column (this is the glitchy one), but it doesn't matter what I use, post_author, post_name, post_title...they all give the same glitch. And if I try only one parameter, excluding the menu_order parameter, I get a blank page.
No Glitch, title ordered
Glitch list, date ordered
Note--I temporarily renamed these files by date.
So, I need help fixing the date thing--I want this to function like an archive page, and like a normal wordpress page--when people come to it they see the most recent thing first, not the other way around, and I need it to be in code that can be on the individual subpage, because if I edit the theme code I don't think I can make it affect the subpage and not the sub-subpage pages.
Also, I don't know if it's possible, but it would be really cool if the list showed the subpages in order by date, and also displayed the dates for the subpages--without my having to put the dates in the title or anything. There isn't any archiving system for subpages and this is the closest thing I could think of.
Help please!