Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3024

    Hi,

    I need help, i would like to know:

    How to sort by older posts ?

    from older to newer posts possible ?

    or to choose one posts always on top by category without changing scheddule ? (to keep google referencement good)

    thanks a lot,

    Raphaël Nordier

    #40288

    Hey,

    1) To show older posts on the top just replace following line in index.php:

    $query_string = "cat=".$negative_cats."&paged=$paged";

    with:

    $query_string = "cat=".$negative_cats."&paged=$paged&order=ASC";

    2) You can make your post sticky by using the Publish settings in your post/page editor (Visibility > Public – Stick post to top)

    #40289

    Doesn’t work ;o(

    exemple: test in sandrine beaudun artiste

    http://www.terres-dananda.com/category/les-artistes-artisans/artiste-sandrine-beaudun/

    i modified the index.php from habitat folder right ?

    thanks

    R.

    #40290

    Sorry, I thought you wanted to change the post order on the mainpage/homepage. To change the order on archive pages open up archive.php and replace:

    if (have_posts()) :
    while ( have_posts()) : the_post();
    $more = 0;

    with:

    query_posts($query_string . '&order=ASC');

    if (have_posts()) :
    while ( have_posts()) : the_post();
    $more = 0;

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

The topic ‘How to sort by older posts ? from older to newer posts possible ?’ is closed to new replies.