Want more features on Pastebin? Sign Up, it's FREE!
Guest

Category Archives

By: a guest on Jul 18th, 2013  |  syntax: None  |  size: 0.96 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. Template Name: Category Archives
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9. <!-- Begin Content Column -->
  10.  
  11. <div id="content-news">
  12.  
  13. <!-- Begin Bars -->
  14.  
  15. <?php include('single-bars.php'); ?>
  16.  
  17. <!-- End Bars -->
  18.  
  19. <!-- Start Contents -->
  20.  
  21. <div class="maincontents">
  22.  
  23. <div class="title-archive"><h1><?php $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
  24. if (0 < $numposts) $numposts = number_format($numposts); ?><?php echo $numposts.' Articulos Publicados'; ?></h1></div>
  25.  
  26. <ul id="archive-list">
  27. <?php
  28. $myposts = get_posts('numberposts=-1&');
  29. foreach($myposts as $post) : ?>
  30. <li><?php the_time('m/d/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  31. <?php endforeach; ?>
  32. </ul>
  33.  
  34. </div>
  35.  
  36. <!-- End Contents -->
  37.          
  38. </div>
  39. <!-- End Content Column -->
  40.  
  41. <!-- ********* ******* TERMINAN CONTENIDOS ******** ******* -->
  42.  
  43. <?php get_sidebar('detallenoticias'); ?>
  44.  
  45. <?php get_footer(); ?>
clone this paste RAW Paste Data