Jump to content
Sign in to follow this  
acuitas

Reverse the Chronological Order of Posts

Recommended Posts

acuitas

I hope this isn't asking too much. I did some homework and found this solution: -------------- In your index.php file, look for this bit of code: <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> Right before that line, add this code: <?php query_posts($query_string . ???&order=ASC???) ?> -------------- Trouble is I can't find an index.php in the Platform Pro theme or wordpress that has that line of code. Maybe I am just tired and blind today. But can anyone offer me another lead on a solution to my goal. I want the blog posts to list in reverse order. Sounds silly, but I have a good reason.

Share this post


Link to post
Share on other sites
acuitas

One more thing....more importantly, I need to reverse the order of posts in one category, but not in another, but I'm sure that is asking way too much.

Share this post


Link to post
Share on other sites
timlinson

Hey acuitas, in the platform framework, that loop takes place in the platformpro/template.postloop.php file. It's best to copy it over to the platformbase folder and make your changes there in order to preserve them through ppro ugprades. For your 2nd question, you might get some ideas from this codex link. They use the `posts_orderby` filter and `is_category()` conditional.. you may be able to adapt it to your needs. If you end up using a hook instead, it would go in the platformbase/functions.php file. http://codex.wordpress.org/Custom_Queries#Display_Order_and_Post_Count_Limit

Share this post


Link to post
Share on other sites
acuitas

Thank you so much Tim. What a terrific and intelligent answer! I think I can do this. I will pursue this avenue. Again, thanks!

Share this post


Link to post
Share on other sites
timlinson

Cool, post back if you run into any issues.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×