Advertisement
Guest User

WordPress ORDERBY TITLE

a guest
Sep 28th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.39 KB | None | 0 0
  1. <?php
  2. global $query_string;
  3. query_posts( $query_string . '&orderby=title' );
  4. if ( have_posts() ) : ?>
  5. <header class="container">
  6.     <?php
  7.     the_archive_title( '<h1 class="text-center">', '</h1>' );
  8.     the_archive_description( '<h4 class="text-center">', '</h4>' );
  9.     ?>
  10. </header><!-- .page-header -->
  11.  
  12. <section class="categorias">
  13.     <div class="container">
  14.         <?php  while ( have_posts() ) : the_post();?>
  15.             <?php if (get_post_meta($post->ID, 'reservado', true) == 'no'): ?>
  16.                 <div class="col-md-4">
  17.                     <h3>
  18.                         <a href="<?php echo get_permalink();?>">
  19.                             <?php the_title();?>
  20.                         </a>
  21.                     </h3>
  22.                     <?php echo odin_thumbnail(400, 200, true, 'minha-classe' ); ?>
  23.                 </div>
  24.             <?php endif ?>
  25.         <?php endwhile; ?>
  26.         <div class="col-md-12">
  27.             <div class="text-center">
  28.                 <ul class="pagination">
  29.                     <li><?php echo paginate_links(); ?></li>
  30.                 </ul>
  31.             </div>
  32.         </div>
  33.     <?php else:?>
  34.         <div class="col-md-12 text-center">
  35.             <h1>Não existem pontos nesta semana</h1>
  36.             <img src="/logo.png" class="img-responsive">
  37.             <?php get_search_form(); ?>
  38.         </div>
  39.     <?php endif; ?>
  40. </div>
  41. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement