Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 28th, 2012  |  syntax: PHP  |  size: 4.24 KB  |  views: 56  |  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 get_header(); ?>
  2. <?php
  3. $paged = (get_query_var("paged")) ? get_query_var("paged") : 1;
  4.                
  5. if (is_month())
  6. {
  7.     $title = __("Monthly archive", BRANKIC_THEME_SHORT);
  8.     $subtitle = __("för ", BRANKIC_THEME_SHORT) . single_month_title('', false);
  9.     if ($paged > 1) $subtitle .= " - " . __("page", BRANKIC_THEME_SHORT) . " " . $paged;
  10. }
  11.  
  12. if (is_tag())
  13. {
  14.     $title = __("Tag archive", BRANKIC_THEME_SHORT);
  15.     $subtitle = __("för ", BRANKIC_THEME_SHORT) . single_tag_title('', false);
  16.     if ($paged > 1) $subtitle .= " - " . __("page", BRANKIC_THEME_SHORT) . " " . $paged;
  17. }
  18. if (is_search())
  19. {
  20.     $title = __("Search results", BRANKIC_THEME_SHORT);
  21.     $subtitle = __("för ", BRANKIC_THEME_SHORT) . $_GET["s"];
  22.     if ($paged > 1) $subtitle .= " - " . __("page", BRANKIC_THEME_SHORT) . " " . $paged;
  23. }
  24. if (is_category())
  25. {
  26.     $title = __("Archive", BRANKIC_THEME_SHORT);
  27.     $subtitle = __("för ", BRANKIC_THEME_SHORT) . single_cat_title('', false);
  28.     if ($paged > 1) $subtitle .= " - " . __("page", BRANKIC_THEME_SHORT) . " " . $paged;
  29. }
  30. if (is_home())
  31. {
  32.     $title = get_option('blogname');
  33.     $subtitle = get_option('blogdescription');
  34.     if ($paged > 1) $subtitle .= " - " . __("page", BRANKIC_THEME_SHORT) . " " . $paged;
  35. }
  36. ?>
  37.     <div class="section-title">
  38.    
  39.         <h1 class="title"><?php echo $title; ?> <span><?php echo $subtitle; ?></span></h1>
  40.                        
  41.     </div><!--END SECTION TITLE-->
  42.     <div id="inner-content" class="blog1">
  43. <?php if(have_posts()) : while ( have_posts() ) : the_post();
  44.  
  45. $featured_image_array = wp_get_attachment_image_src( get_post_thumbnail_id(), 'single-post-thumbnail' );
  46. $featured_image = $featured_image_array[0];
  47. ?>
  48.  
  49.             <div class="post">
  50.            
  51.                 <div class="post-info">                        
  52.                     <div class="date"><span class="month"><?php the_time('M'); ?></span><span class="day"><?php the_time('d'); ?></span><span class="month"><?php the_time('Y'); ?></span></div>                    
  53.                     <div class="comments"><?php comments_popup_link('<span>0</span> Kommen-
  54.                                         tarer', '<span>1</span> Kommentar', '<span>%</span> Kommen-
  55.                                         tarer'); ?></div>                            
  56.                 </div><!--END POST-INFO-->        
  57.                
  58.                 <div class="post-content">    
  59.            
  60.                     <div class="post-media">        
  61.                         <a href="<?php the_permalink(); ?>"><img src="<?php echo $featured_image; ?>" alt="" width="600" /></a>
  62.                     </div><!--END POST-MEDIA-->
  63.                
  64.                     <div class="post-title">                
  65.                         <h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  66.                     </div><!--END POST-TITLE-->
  67.                
  68.                     <div class="post-meta">                
  69.                         <ul>
  70.                             <li><span><?php _e('Posted by', BRANKIC_THEME_SHORT); ?></span> <?php the_author_link(); ?></li>
  71. <?php if (get_option(BRANKIC_VAR_PREFIX."show_cats_blog_page") == "yes") { ?><li><span><?php _e('i', BRANKIC_THEME_SHORT); ?></span> <?php the_category(', '); ?></li><?php } ?>
  72. <?php if (get_option(BRANKIC_VAR_PREFIX."show_tags_blog_page") == "yes") { ?><li><span><?php _e(' Taggad med', BRANKIC_THEME_SHORT); ?></span> <?php the_tags('', ', ', ''); ?></li><?php } ?>
  73.                         </ul>
  74.                     </div><!--END POST-META-->    
  75. <?php
  76. the_excerpt();
  77. ?>
  78. <p><a href="<?php the_permalink(); ?>" class="more-link"><?php _e('Fortsätt läsa &rarr;', BRANKIC_THEME_SHORT); ?></a></p>
  79.                 </div><!--END POST-CONTENT -->
  80.                
  81.             </div><!--END POST-->
  82.  
  83.  
  84.  
  85. <?php endwhile; // End the loop. Whew. ?>
  86.  
  87. <?php else: //If no posts are present ?>
  88.    
  89.                 <div class="entry">                        
  90.                     <p><?php _e('Inga inlägg hittades.', BRANKIC_THEME_SHORT); ?></p>    
  91.                 </div>
  92.                
  93. <?php endif; ?>
  94.  
  95. <?php
  96. if(function_exists('wp_pagenavi_bra')) { wp_pagenavi_bra(); }  
  97. ?>  
  98.         </div><!--END INNER-CONTENT-->  
  99. <?php
  100. get_sidebar();
  101. ?>
  102.                        
  103. <?php get_footer(); ?>