Support » Plugins » Help Make Nicer Archives Default To Categories Vie

Viewing 8 replies - 1 through 8 (of 8 total)
  • I am sorry that I have not been able to address this sooner, but here is an option.
    The reason that the date is the default is because that is the way WordPress takes care of default sorting. In order for the archives to be sorted by category automatically, you will have to make 2 changes.
    1) Modify the Sorted Archives link to look like this:
    2) Find this line in narchives.php:
    if ($HTTP_POST_VARS[“orderby”] == ‘category’) {
    and replace it with this:
    if ($orderby == ”) $orderby = $HTTP_POST_VARS[“orderby”];
    if ($orderby == ‘category’) {
    HTH and again, sorry for the delay.

    Hey no worries at all Mark, I was just trying to see if anybody else had made a similar modification (didn’t want to bug you.)
    Hmmm, that works except that I lose the category label above the results. Before, if I sorted on category I got the name of the category above the articles now I get the results but no category “Label”

    🙂 No worries.
    The second change was to make sure the category labels worked. I am having trouble recreating this on my server (due to different configurations).
    Would you try adding:
    global $orderby;
    before the:
    if ($orderby == ”) $orderby = $HTTP_POST_VARS[“orderby”];
    if ($orderby == ‘category’) {
    and see if that helps?

    Added it, didn’t change the behaviour.

    If you click on the link to all archives from the forum (didn’t change the sorted archives link there) you see the date header. Then when you sort it to “categories” it used to put the category header where the date header initially was. Now it sorts but the category header is not there. Just thought I’d make that clearer so you would understand what is happening now. Thanks.

    Has there been any more follow-up on this? I am getting the same result with these changes as phpNeoPhyte… Want to default to the exact look that you get from choosing “Categories” and “Ascending”… Any ideas?

    I changed over to MtDewvirus archives hack so the links in my previous posts are bad now, sorry about that.

    I came up with something that works for me (categories as default)
    You can see it working at
    It may not be the best method, I am sure Mark will have it sorted soon. No it does not nest subcategories.
    [My categories will be a untidy today anyway as I am reorganising my structure].

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Help Make Nicer Archives Default To Categories Vie’ is closed to new replies.