• Hi,

    After I upgrade my blog to v3.1. I realize that all my blog post showing descending. eg, post on oct 27, 2010 showing in first and the post on mar 2, 2011 showing in the last.

    Can anyone help me to resolve this issue? thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • what’s on your code file?

    Thread Starter jc93

    (@jc93)

    may i know what’s the code file do you mean?

    thanks!

    the one it’s calling the posts. it can be home.php or index.php, for example.

    Thread Starter jc93

    (@jc93)

    So where should I check what’s on my code file?

    You may have a look with my blog : https://www.jcwangzhang.com

    Appreciate for your replied and help!

    Thanks!

    you’re welcome!

    you can check going to your wordpress panel, then Appearance -> Editor -> Home (home.php)
    if isn’t there a home.php you can go on index.php.

    and paste the code here so we can take a look at it.

    and maybe there’s some option on the panel about the way the posts are called….

    Thread Starter jc93

    (@jc93)

    Hi, I just got the index.php

    <?php if (is_archive()) $post_number = get_option(‘personalpress_archivenum_posts’);
    if (is_search()) $post_number = get_option(‘personalpress_searchnum_posts’);
    if (is_tag()) $post_number = get_option(‘personalpress_tagnum_posts’);
    if (is_category()) $post_number = get_option(‘personalpress_catnum_posts’);
    if (is_home()) $args=array(
    ‘showposts’=>get_option(‘personalpress_homepage_posts’),
    ‘paged’=>$paged,
    ‘category__not_in’ => get_option(‘personalpress_exlcats_recent’),
    ); ?>
    <?php get_header(); ?>

    <?php global $query_string;
    if (is_category()) query_posts($query_string . “&showposts=$post_number&paged=$paged&cat=$cat”);
    elseif (is_home()) query_posts($args);
    else query_posts($query_string . “&showposts=$post_number&paged=$paged”); ?>

    <div id=”main”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php $thumb = ”;

    $width = 175;
    $height = 175;
    $classtext = ”;
    $titletext = get_the_title();

    $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
    $thumb = $thumbnail[“thumb”]; ?>

    <?php global $post;
    $page_result = is_search() && ($post->post_type == ‘page’) ? true : false; ?>

    <div class=”entry-wrap<?php if ($page_result) echo(‘ page_result’); ?>”>
    <div class=”entry”>
    <h2 class=”title”>” title=”<?php printf(__(‘Permanent Link to %s’, ‘PersonalPress’), $titletext) ?>”><?php the_title(); ?></h2>

    <?php if (get_option(‘personalpress_postinfo1’) <> ”) { ?>
    <?php if ( in_array(‘date’, get_option(‘personalpress_postinfo1’)) ) { ?>
    <p class=”date”>
    <span class=”month”><?php the_time(‘M’); ?></span>
    <span class=”day”><?php the_time(‘d’); ?></span>
    </p>
    <?php }; ?>
    <?php }; ?>

    <div class=”entry-content clearfix”>
    <?php if($thumb <> ” && get_option(‘personalpress_thumbnails_index’) == ‘on’) { ?>
    <div class=”thumb”>
    <?php print_thumbnail($thumb, $thumbnail[“use_timthumb”], $titletext, $width, $height, $classtext); ?>

    ” title=”<?php printf(__(‘Permanent Link to %s’, ‘PersonalPress’), $titletext) ?>”><span class=”overlay”></span>
    </div> <!– end .thumb –>
    <?php }; ?>

    <?php if (get_option(‘personalpress_blog_style’) == ‘on’) the_content(“”); else { ?>
    <p><?php truncate_post(370); ?></p>
    <?php }; ?>

    ” title=”<?php printf(__(‘Permanent Link to %s’, ‘PersonalPress’), $titletext) ?>” class=”readmore”><span><?php _e(‘Read More’,’PersonalPress’); ?></span>
    </div> <!– end .entry-content –>

    <div class=”post-meta-top”></div>

    <div class=”post-meta clearfix”>
    <?php if (get_option(‘personalpress_postinfo1’) <> ”) { ?>
    <?php if ( in_array(‘author’, get_option(‘personalpress_postinfo1’)) || in_array(‘comments’, get_option(‘personalpress_postinfo1’)) || in_array(‘categories’, get_option(‘personalpress_postinfo1’)) ) { ?>

    <?php if ( in_array(‘author’, get_option(‘personalpress_postinfo1’)) ) { ?>
    <span class=”meta-info author”>
    <span class=”right-sep”>
    <?php the_author_posts_link(); ?>
    </span>
    </span>
    <?php }; ?>

    <?php if ( in_array(‘comments’, get_option(‘personalpress_postinfo1’)) ) { ?>
    <span class=”meta-info comments-number”>
    <span class=”right-sep”>
    <?php comments_popup_link(__(‘0 comments’,’PersonalPress’), __(‘1 comment’,’PersonalPress’), ‘% ‘.__(‘comments’,’PersonalPress’)); ?>
    </span>
    </span>
    <?php }; ?>

    <?php if ( in_array(‘categories’, get_option(‘personalpress_postinfo1’)) ) { ?>
    <span class=”meta-info categories”>
    <span class=”right-sep”>
    <?php the_category(‘, ‘) ?>
    </span>
    </span>
    <?php }; ?>

    <?php }; ?>
    <?php }; ?>
    </div> <!– end .post-meta –>

    </div> <!– end .entry –>
    </div> <!– end .entry-wrap –>

    <?php endwhile; ?>

    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); }
    else { ?>
    <?php include(TEMPLATEPATH . ‘/includes/navigation.php’); ?>
    <?php } ?>

    <?php else : ?>
    <?php include(TEMPLATEPATH . ‘/includes/no-results.php’); ?>
    <?php endif; wp_reset_query(); ?>

    </div> <!– end #main –>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Hopefully you can find something wrong inside =) Thank!

    Alwyn Botha

    (@123milliseconds)

    Please paste code at https://wordpress.pastebin.com/

    Select PHP syntax highlighting so we can easily read the code

    Thread Starter jc93

    (@jc93)

    Kindly look with this link. Thanks!

    https://pastebin.com/embed_js.php?i=E7wcSq9y

    Alwyn Botha

    (@123milliseconds)

    Change LIne 13 to 17 to sort ascending

    if (is_category()) query_posts($query_string . “&showposts=$post_number&paged=$paged&cat=$cat&order=’DESC'”);
    #
    elseif (is_home()) query_posts($args);
    #
    else query_posts($query_string . “&showposts=$post_number&paged=$paged&order=’DESC'”); ?>

    Thread Starter jc93

    (@jc93)

    Hi,

    That mean I just replace the code your was given into the line 13 to 17?

    Alwyn Botha

    (@123milliseconds)

    First backup that file

    Then, yes replace those lines in the code

    Test and post results here

    Thread Starter jc93

    (@jc93)

    Hi,

    I was tried. But too bad !!! It doesn’t work and the sidebar run away to the bottom.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Why is my blog post show by descending?’ is closed to new replies.