Advertisement
Guest User

category

a guest
Aug 11th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.12 KB | None | 0 0
  1. <?php global $theme; get_header(); ?>
  2.  
  3.     <div id="main">
  4.    
  5.         <?php $theme->hook('main_before'); ?>
  6.    
  7.         <div id="content">
  8.        
  9.             <?php $theme->hook('content_before'); ?>
  10.        
  11.             <h2 class="page-title"><?php printf( __( 'Category Archives: <span>%s</span>', 'themater' ), single_cat_title( '', false ) ); ?></h2>
  12.            
  13.             <?php
  14.                
  15.                      /**
  16.                      * The default post formatting from the post.php template file will be used.
  17.                      * If you want to customize the post formatting for your category pages:
  18.                      *
  19.                      *   - Create a new file: post-category.php
  20.                      *   - Copy/Paste the content of post.php to post-category.php
  21.                      *   - Edit and customize the post-category.php file for your needs.
  22.                      *
  23.                      * Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
  24.                      */
  25.                      
  26.                     $is_post_wrap++;
  27.                         if($is_post_wrap == '1') {
  28.                             ?><div class="post-wrap clearfix"><?php
  29.                         }
  30.                         get_template_part('post', 'category');
  31.                        
  32.                         if($is_post_wrap == '2') {
  33.                             $is_post_wrap = 0;
  34.                             ?></div><?php
  35.                         }
  36.                
  37.                 else {
  38.                     get_template_part('post', 'noresults');
  39.                 }
  40.                    
  41.                     if($is_post_wrap == '1') {
  42.                         ?></div><?php
  43.                     }
  44.                
  45.                 get_template_part('navigation');
  46.             ?>
  47.            
  48.             <?php $theme->hook('content_after'); ?>
  49.        
  50.         </div><!-- #content -->
  51.    
  52.         <?php get_sidebars(); ?>
  53.        
  54.         <?php $theme->hook('main_after'); ?>
  55.        
  56.     </div><!-- #main -->
  57.    
  58. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement