Change "Older Posts" nav link to "Newer" but only for specific page

I created a categories-n.php file and added this line to change the oderby to begin at the oldest posts.

<?php query_posts($query_string."&orderby=date&order=ASC"); ?>

It worked and the posts appear in the order I want, but I can’t figure out how to change the nav button for only this specific page (which redirects to a category url) to Newer Posts rather than Older Posts.

I made it as far as the template-tags.php with the next_post function but I don’t think that controls what I’m looking to adjust. Also, how can I implement this so updating the theme won’t wipe it out?

Thanks in advance.

On the custom categories-n.php page I made where I changed the oderby can I simply change the nav call or pass an argument with it to achieve this?

<?php sparkling_paging_nav(); ?>

I tried turning my infinite scroll from click to scroll hoping that removing the button altogether would just fix it but it didn’t work. As soon as you scroll to the point where the url is appended with /page2 then the sortby order is wrong again.

I think I’m going to leave the infinite scroll on so my question has changed slightly. What I need to know is how to change the sortby order for an entire page but not the entire blog. And by page, I mean a page that is really just displaying all posts of a certain category (and in my case this makes it longer than just 1 page).

Thanks in advance. I’ve been using the theme for over a year now and love it.

I figured this out for myself. I create pages that redirect to my category url (so when I click ‘blog’ for instance, the blog page redirects to the blog category url: I simply added /?order=asc to the end of the category url the page redirects to.

I took me a long time (relatively speaking) to find this so I thought I’d update my own question for anyone else who comes along with a similar one.

Hi @edpelo,

Awesome great to see you got that figured out.

Please advise if you have more questions.

Have a fantastic day!