Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Sergei-78

  • Rank
  1. Please could you help me to sort out the search result? I need to sort it by date and the latest post should be at the top. <?php if ( have_posts() ): ?> <h2 style="font-weight:normal!important">Search Results for '<?php echo get_search_query(); ?>'</h2> <ol style="list-style:none!important;"> <?php while ( have_posts() ) : the_post(); ?> <li> <article> <h2><a href="<?php esc_url( the_permalink() ); ?>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <time datetime="<?php the_time( 'Y-m-d' ); ?>" pubdate><?php the_date(); ?> <?php the_time(); ?></time> <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?> <?php the_content(); ?> </article> </li> <?php endwhile; ?> </ol> <?php else: ?> <h2>No results found for '<?php echo get_search_query(); ?>'</h2> <?php endif; ?>
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.