Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <?php
- query_posts('showposts=1');
- $ids = array();
- while (have_posts()) : the_post();
- $ids[] = get_the_ID(); ?>
- <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>
- <div class="newest-post-wrap" style="background: url(<?php echo $src[0]; ?> ) top center !important; background-size: cover !important;">
- <div class="newest-post">
- <div class="newest-post-content">
- <div class="newest-post-info cf">
- <div class="post-category-new">
- <?php the_category(' '); ?>
- </div>
- <time class="date-new">
- <span class="date-icon"></span><?php the_time('d F Y'); ?>
- </time>
- <div class="comments-new">
- <span class="comment-icon"></span><?php comments_popup_link( '0', '1', '%', 'comments-link', 'Komentarze wyłączone'); ?>
- </div>
- </div>
- <div class="article-content-new">
- <h1 class="h1-big"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- </div>
- </div> <!-- end newest-post-content -->
- </div> <!-- end newest-post -->
- </div> <!-- end newest-post-wrap -->
- <?php
- endwhile;
- wp_reset_query();
- ?>
- <div class="main-wrap">
- <div class="content-wrap">
- <?php get_sidebar(); ?>
- <section class="posts">
- <?php $q = new WP_Query(array(
- 'post__not_in' => $ids,
- 'paged' => get_query_var('paged'),
- )
- );
- while ( $q->have_posts() ) : $q->the_post(); ?>
- <div class="post">
- <article>
- <header>
- <div class="image-container">
- <a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'single-post', array('class' => 'post-thumb') ); } ?></a>
- <div class="h1-normal-wrap">
- <div class="category-normal">
- <?php the_category(' '); ?>
- </div>
- <h1 class="normal"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- </div>
- </div>
- </header>
- <div class="post-content">
- <p class="normal"><?php the_excerpt( $stripteaser ); ?></p>
- </div>
- <div class="post-info-normal">
- <time class="date">
- <span class="date-icon"></span><?php the_time('d F Y'); ?>
- </time>
- <div class="comments">
- <span class="comment-icon"></span><?php comments_popup_link( '0', '1', '%', 'comments-link', 'Komentarze wyłączone'); ?>
- </div>
- </div>
- </article>
- </div>
- <?php endwhile;
- wp_reset_query() ?>
- <!-- Add the pagination functions here. -->
- <div class="nav-previous alignleft"><?php next_posts_link( 'Starsze artykuły' ); ?></div>
- <div class="nav-next alignright"><?php previous_posts_link( 'Nowsze artykuły' ); ?></div>
- </section><!-- end posts -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement