Advertisement
Guest User

connectto_category-portfolio

a guest
Jun 5th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Category-portfolio
  4. */
  5. ?>
  6. <?php
  7. /**
  8. * The template for displaying Archive pages.
  9. *
  10. * Used to display archive-type pages if nothing more specific matches a query.
  11. * For example, puts together date-based pages if no date.php file exists.
  12. *
  13. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  14. *
  15. * @package WordPress
  16. * @subpackage Twenty_Eleven
  17. * @since Twenty Eleven 1.0
  18. */
  19.  
  20. get_header(); ?>
  21.  
  22. <section id="primary">
  23. <div id="content" role="main">
  24.  
  25. <?php if ( have_posts() ) : ?>
  26.  
  27. <header class="page-header">
  28. <h1 class="page-title">
  29. <?php if ( is_day() ) : ?>
  30. <?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
  31. <?php elseif ( is_month() ) : ?>
  32. <?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
  33. <?php elseif ( is_year() ) : ?>
  34. <?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
  35. <?php else : ?>
  36. <?php _e( 'Portfólio', 'twentyeleven' ); ?>
  37. <?php endif; ?>
  38. </h1>
  39. </header>
  40.  
  41.  
  42.  
  43. <ul class="category">
  44.  
  45. <?php $archive_query = new WP_Query('cat=3&showposts=1000');
  46. while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
  47.  
  48. <li>
  49. <?php get_template_part( 'content', get_post_format() ); ?>
  50. </li>
  51.  
  52. <?php endwhile; ?>
  53. </ul>
  54.  
  55.  
  56.  
  57. </div><!-- .entry-content -->
  58. </article><!-- #post-0 -->
  59.  
  60. <?php endif; ?>
  61.  
  62. </div><!-- #content -->
  63. </section><!-- #primary -->
  64.  
  65. <?php get_sidebar(); ?>
  66. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement