Advertisement
Guest User

category.php

a guest
Jun 12th, 2012
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.58 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php get_sidebar(); ?>
  4.  
  5.         <div class="right">
  6.             <div class="content" role="main">
  7.  
  8.             <?php if ( have_posts() ) : ?>
  9.            
  10.                 <div class="breadcrumbs"><a href="<?php bloginfo('url'); ?>" title="Till startsidan">Hem</a> &raquo; <a href="<?php bloginfo('url'); ?>/las-och-kommentera/">Tidningsarkiv</a> &raquo; <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></div>
  11.  
  12.                 <header class="page-header">
  13.                     <h3 class="page-title"><?php single_cat_title() ?></h3>
  14.                 </header>
  15.                
  16.                 <?php rewind_posts(); ?>
  17.                
  18.                 <?php $posts = query_posts($query_string . '&orderby=title'); ?>
  19.  
  20.                 <?php /* Start the Loop */ ?>
  21.                 <?php while ( have_posts() ) : the_post(); ?>
  22.  
  23.                     <?php $number = get_post_meta($post->ID, 'number', true); ?>
  24.  
  25.                     <article class="fanzine-archive">
  26.                                        
  27.                         <a href="<?php the_permalink(); ?>" title="<?php single_cat_title(); ?> nummer <?php echo $number ?>"><?php
  28.                         if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
  29.                             the_post_thumbnail('fanzine-thumb');
  30.                         }
  31.                         ?></a>
  32.                        
  33.                        
  34.                         <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php single_cat_title(); ?> nummer <?php echo $number ?>"><?php single_cat_title(); ?> nummer <?php echo $number ?></a></h2>
  35.                        
  36.                         <div class="fanzine-archive-meta category">
  37.                        
  38.                             <div class="date">
  39.                                
  40.                                 <strong>Datum:</strong>
  41.                                 <?php $number_date = get_post_meta($post->ID, 'number_date', true); ?>
  42.                                 <?php echo $number_date ?>
  43.                                
  44.                             </div>
  45.                            
  46.                             <div class="pages">
  47.                                
  48.                                 <strong>Antal sidor:</strong>
  49.                                 <?php $number_of_pages = get_post_meta($post->ID, 'number_of_pages', true); ?>
  50.                                 <?php echo $number_of_pages ?>
  51.                                
  52.                             </div>
  53.                        
  54.                             <div class="city">
  55.                                
  56.                                 <strong>Stad:</strong>
  57.                                 <?php $city = get_post_meta($post->ID, 'city', true); ?>
  58.                                 <?php echo $city ?>
  59.                                
  60.                             </div>
  61.                            
  62.                            
  63.                             <div class="publisher">
  64.                                
  65.                                 <strong>Utgivare:</strong>
  66.                                 <?php $publisher = get_post_meta($post->ID, 'publisher', true); ?>
  67.                                 <?php echo $publisher ?>
  68.                                
  69.                             </div>
  70.                                                        
  71.                             <div style="clear: both; width: auto; float: none;"></div>
  72.                        
  73.                         </div>
  74.                        
  75.                         <div style="clear: both;"></div>
  76.  
  77.                     </article>
  78.  
  79.                 <?php endwhile; ?>
  80.                
  81.                     <?php comments_template(); ?>
  82.    
  83.                     <div class="navigation">
  84.                            
  85.                        <div class="nav-previous"><?php next_posts_link( __( '&laquo; Äldre' ) ); ?></div>
  86.                        <div class="nav-next"><?php previous_posts_link( __( 'Nyare &raquo;' ) ); ?></div>
  87.                    
  88.                     </div> <!-- navigation -->
  89.  
  90.                 <?php else : ?>
  91.    
  92.                     <article id="post-0" class="post no-results not-found">
  93.                    
  94.                         <div class="breadcrumbs">
  95.                             <?php if(function_exists('bcn_display'))
  96.                             {
  97.                                 bcn_display();
  98.                             }?>
  99.                         </div>
  100.                    
  101.                         <header class="entry-header">
  102.                             <h2 class="entry-title"><?php _e( 'Nothing Found', 'clearlyobscure' ); ?></h2>
  103.                         </header><!-- .entry-header -->
  104.    
  105.                         <div class="post-content">
  106.                             <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'clearlyobscure' ); ?></p>
  107.                             <?php get_search_form(); ?>
  108.                         </div><!-- .post-content -->
  109.                        
  110.                     </article><!-- #post-0 -->
  111.    
  112.                 <?php endif; ?>
  113.    
  114.                 </div><!-- .content -->
  115.                
  116.             </div><!-- .right -->
  117.            
  118.             <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement