Support » Plugin: Chronological Posts » i use imnews theme. I want reverse cron

  • Resolved carterson2

    (@carterson2)


    I am not using your plugin, but learning from it….
    I want new posts first, but for the life of me cant get it that way…

    How can I just stuff in ASC or DESC somewhere??
    I am a newbie, but will hack if its just one line somewhere….
    Any leads appreciated, but not expected.
    (btw, have you seen the new tip jars? Eg paypal.me/wikispeedia )

    -jim

    ——————
    add_filter( ‘pre_get_posts’, ‘reverse_post_order_pre_get_posts’ );
    function reverse_post_order_pre_get_posts( $query ) {
    if ( ! is_admin() && $query->is_main_query() ) {
    $query->set( ‘order’, ‘ASC’ );
    }
    }
    ———————

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Nick Halsey

    (@celloexpressions)

    Posts are reverse chronological by default. You shouldn’t need to do anything to get that behavior – this plugin just changes the default.

Viewing 1 replies (of 1 total)
  • The topic ‘i use imnews theme. I want reverse cron’ is closed to new replies.