Advertisement
Guest User

Untitled

a guest
Feb 24th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.78 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4. query_posts('showposts=1');
  5. $ids = array();
  6. while (have_posts()) : the_post();
  7. $ids[] = get_the_ID(); ?>
  8.  
  9. <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>
  10. <div class="newest-post-wrap" style="background: url(<?php echo $src[0]; ?> ) top center !important; background-size: cover !important;">
  11.     <div class="newest-post">
  12.         <div class="newest-post-content">
  13.             <div class="newest-post-info cf">
  14.                 <div class="post-category-new">
  15.                     <?php the_category(' '); ?>
  16.                 </div>
  17.                 <time class="date-new">
  18.                     <span class="date-icon"></span><?php the_time('d F Y'); ?>                        
  19.                 </time>
  20.                 <div class="comments-new">
  21.                     <span class="comment-icon"></span><?php comments_popup_link( '0', '1', '%', 'comments-link', 'Komentarze wyłączone'); ?>
  22.                 </div>
  23.             </div>
  24.             <div class="article-content-new">
  25.                 <h1 class="h1-big"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  26.             </div>              
  27.         </div> <!-- end newest-post-content -->
  28.     </div> <!-- end newest-post -->
  29. </div> <!-- end newest-post-wrap -->
  30.  
  31. <?php  
  32.     endwhile;
  33.     wp_reset_query();
  34. ?>
  35.  
  36. <div class="main-wrap">
  37.     <div class="content-wrap">
  38.         <?php get_sidebar(); ?>
  39.         <section class="posts">
  40.             <?php  $q = new WP_Query(array(
  41.                 'post__not_in' => $ids,
  42.                 'paged' => get_query_var('paged'),
  43.                 )
  44.             );
  45.                 while ( $q->have_posts() ) : $q->the_post(); ?>
  46.                     <div class="post">
  47.                         <article>
  48.                             <header>
  49.                                 <div class="image-container">
  50.                                     <a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'single-post', array('class' => 'post-thumb') ); } ?></a>
  51.                                     <div class="h1-normal-wrap">
  52.                                         <div class="category-normal">
  53.                                             <?php the_category(' '); ?>
  54.                                         </div>
  55.                                         <h1 class="normal"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  56.                                     </div>
  57.                                 </div>
  58.                             </header>
  59.                             <div class="post-content">
  60.                                 <p class="normal"><?php the_excerpt( $stripteaser ); ?></p>
  61.                             </div>
  62.                             <div class="post-info-normal">
  63.                                 <time class="date">
  64.                                     <span class="date-icon"></span><?php the_time('d F Y'); ?>    
  65.                                 </time>
  66.                                 <div class="comments">
  67.                                     <span class="comment-icon"></span><?php comments_popup_link( '0', '1', '%', 'comments-link', 'Komentarze wyłączone'); ?>
  68.                                 </div>
  69.                             </div>
  70.                         </article>
  71.                     </div>
  72.                 <?php endwhile;
  73.                 wp_reset_query() ?>
  74.             <!-- Add the pagination functions here. -->
  75.  
  76.             <div class="nav-previous alignleft"><?php next_posts_link( 'Starsze artykuły' ); ?></div>
  77.             <div class="nav-next alignright"><?php previous_posts_link( 'Nowsze artykuły' ); ?></div>
  78.         </section><!-- end posts -->                                  
  79.  
  80. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement