Oldest Post First

Community Forums Forums Design Tips and Tricks Oldest Post First

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  a.musical.gal 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #80329

    a.musical.gal
    Participant
    Post count: 5

    My website is a learning log that is required for my college course. Ideally, I want all my categories to go in oldest post order so that when assessors view the site, they can go through it in the correct order. The content on my site is worth a heavy percentage so I need it to be just right for them.

    I tried using the code featured here and it did work. The problem was that it overrode my static front page and put posts in its place. So, I have to remove it again.

    I also tried a couple of plugins. One that worked well was Really Simple Series. However, the downside to that plugin is it also lists every page in the series. As some would be 20-30 posts worth, that would have been one very long list.

    Any help appreciated.

    #80332

    nunotmp
    Participant
    Post count: 164

    Are you using a custom template as your front page?


    #80333

    nunotmp
    Participant
    Post count: 164

    You can place this code

    
    add_action('genesis_before_loop', 'child_before_loop');
    function child_before_loop () {
        global $query_string;
        query_posts($query_string . "&order=ASC");
    }
    

    into your template file to only effect the page that uses this file or add conditional tags to limit the effect.
    If you want to target a page with specific page titel then you would use something like this

    
    if ( is_page( 'page-title' ) ) {
    add_action('genesis_before_loop', 'child_before_loop');
    function child_before_loop () {
        global $query_string;
        query_posts($query_string . "&order=ASC");
    }
    }
    

    have a look at the codex for some more examples. http://codex.wordpress.org/Function_Reference/is_pageis_page Codex


    #80334

    a.musical.gal
    Participant
    Post count: 5

    No. I have my front page as a full width set up and then my posts have a right hand sidebar but all one template.

    • This reply was modified 10 months, 1 week ago by  a.musical.gal.
    • This reply was modified 10 months, 1 week ago by  a.musical.gal.
    #80776

    a.musical.gal
    Participant
    Post count: 5

    So, I managed to find a plugin that did exactly what I wanted. I thought I was finally done and could get on with actually posting my work.

    However, I have now had feedback from a friend that because each category goes to the oldest post first, if someone was revisiting my log, they might have to go through 20 pages to find the post they want.

    So now the idea is leave my post order as I have it now (oldest first) but change my side bar from recent posts to a list of posts in the category currently selected.

    I believe there is a way to do that but my brain is so fried right now, I cannot figure it out.

    #80826

    a.musical.gal
    Participant
    Post count: 5

    After several hours of cursing at my computer, I got this to all work.

    Resolved.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.