Support » Theme: ColorMag » I want to change sort of post days.

  • Hi,
    I realy loved this theme.
    but,I don’t know how to change sort of post days in index.php.
    I want to sort as ASC.
    I use as widget front page:slider area,front page/content middle left section and so on.
    like demo.
    I could change sort of post days in ardhive page.
    I add text below.
    <?php query_posts($query_string .’&order=ASC’);?>

    but, I don’t know where should I change php file for each widget in index.php’s sort of days.

    My url is

    Please tell me how to fix it.


Viewing 1 replies (of 1 total)
  • Hello,
    If you want to show the post in ascending order on archive you should first create a child theme of the theme, just to make sure the changes still remain even after the theme updates.
    To see how to build a child theme check

    After that copy the archives.php of the parents theme folder to the child theme folder and then find and replace the code from line 85 to 91 with the code given below.

      $args = array('post_type' => 'post','order'=>'ASC');
      $query = new wp_query ($args);?>
      <?php global $post_i; $post_i = 1; ?>
      <?php while ( $query->have_posts() ) : $query->the_post(); ?>
      <?php get_template_part( 'content', 'archive' ); ?>
      <?php endwhile; ?>


Viewing 1 replies (of 1 total)
  • The topic ‘I want to change sort of post days.’ is closed to new replies.