Anonymous User
(@anonymized-126485)
Did you get this working?
Yes! I can’t remember now what the exact issue was, but I think it was user error – my error, that is. 🙂
I’m having the same issue. I checked to be sure that the box to sort in menu order is checked, but the pages keep showing up in alpha order. Can anyone help?
Thanks!
By the way, I’m using WP 3.2.1 with the Genesis theme (child theme – Associate). Like Michael, I’m unable to provide the link to the client site at this point.
Anonymous User
(@anonymized-126485)
On about line 184 of hierpage.php you will see:
$this->hierpages_list_pages($page_options);
Immediately before this could you please insert the line:
print "<hr>"; print_r($page_options); print "<hr>";
and paste here what gets output between the horizontal rules?
Thanks so much for your quick response. I’ll try this and will report back. When you refer to output, do you mean what I see on the site after I’ve made this change?
This is what I see in my sidebar after updating the php file.
show_siblings=yes&show_root=&show_home=&child_of=&sort_column=menu_order,post_title
Anonymous User
(@anonymized-126485)
OK, that shows the plugin is asking WordPress to list the pages by menu_order first and post_title second. Perhaps your theme is interfering somehow. Please contact me directly at bill@saltriversystems.com to see what else we can do to find the problem.
A quick solution is to hardcode the sort order in the plugin file hierpage.php. Basically, the only option would be sorting by menu order. Around line 197, change
if ($instance[‘menu_order’] == ‘yes’) {
$page_options[‘sort_column’]=’menu_order,post_title’;
} else {
$page_options[‘sort_column’]=’post_title’;
}
to
if ($instance[‘menu_order’] == ‘yes’) {
$page_options[‘sort_column’]=’menu_order’;
} else {
$page_options[‘sort_column’]=’menu_order’;
}
I have not looked at the file carefully but it is possible the sort options on the widget are not being passed along. Also, if you upgrade the plugin, this change will be lost.
Yaaayyyy, Tamayo! That worked. Fortunately I had the original plugin php that I was able to modify with your code. Thank you so much!
Bill, I appreciate your help with this, as well. I’m now running the older version of the plugin, but if another fix comes out, I’ll upgrade.
Anonymous User
(@anonymized-126485)
In version 1.1 you should be able to set the sort column to just menu_order … although, really, menu_order,post_title should sort first by the menu order and only use the title within groups of pages with the same value for menu_order.