Advertisement
Tryah85

custom WP template.

Sep 13th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.93 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: works page
  4. */
  5. ?>
  6. <?php get_header();?>
  7. <div id="main">
  8.     <div id="content">
  9.    
  10.  
  11.  
  12.        
  13. <?php get_header();?>
  14.  
  15.  
  16.  
  17.  
  18. <?php
  19. query_posts($query_string . '&cat=-5,-7');
  20. ?>
  21.         <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  22.             <div class="post" id="post-<?php the_ID(); ?>">
  23.             <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  24.         <div class="meta">
  25.         <p>              
  26.                 <?php the_time('M') ?>
  27.                 <?php the_time('d') ?>
  28.                 <?php the_time('Y') ?>
  29.  
  30.                <?php edit_post_link(); ?></p>
  31.     </div>
  32.     <div class="entry">
  33.               <?php the_content(__('Continue Reading &#187;')); ?>
  34.               <?php wp_link_pages(); ?>
  35.         </div>
  36.  
  37.  <!--           <p class="comments">
  38.               <?php comments_popup_link(__('No responses yet'), __('One response so far'), __('% responses so far')); ?>
  39.  
  40.             </p>          -->
  41. <?php next_post_link('%link', 'Next post in category', TRUE); ?>
  42. <?php previous_post_link('%link', 'Previous post in category', TRUE); ?>
  43.             </div>
  44.       <?php endwhile; else: ?>
  45.           <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
  46.       <?php endif; ?>
  47.       <p align="center"><?php posts_nav_link(' - ','&#171; Newer','Older &#187;') ?></p>
  48.  
  49.     </div>
  50.     </div>
  51.     </div>
  52.     </div>
  53.     </div> 
  54.   <?php get_footer();
  55. ?>
  56.    
  57.    
  58.          
  59. <?php
  60. $args = array(
  61.           'cat' => 16,
  62.           'posts_per_page' => -1
  63.      );
  64. $my_portfolio = new WP_Query($args);
  65. if ( $my_portfolio -> have_posts() ) : while ( $my_portfolio -> have_posts() ) : $my_portfolio -> the_post(); ?>
  66.      <li class="<?php foreach((get_the_category()) as $category ) { echo $category->cat_name . ' all'; } ?>">>!-- add your portfolio item content --></li>
  67. <?php endwhile; endif; wp_reset_query(); ?>
  68. </ul>
  69. </ul>
  70. </div>
  71.     </div>
  72.  
  73.   <?php get_footer();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement