SHARE
TWEET

feed alfa

a guest Feb 14th, 2016 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <?php if ( is_home() ) : ?>
  2.  
  3.     <?php
  4.  
  5.     $feed_alfa = new WP_Query( 'posts_per_page=1');
  6.     while ( $feed_alfa->have_posts() ) { $feed_alfa->the_post(); } ?>
  7.  
  8.     <!-- top articles -->
  9.     <div class="top-articles">
  10.  
  11.         <div class="item">
  12.  
  13.             <div class="item-cover"><?php the_post_thumbnail( 'cover-single' ); ?></div>
  14.            
  15.             <div class="item-group">
  16.  
  17.                 <div class="item-category"><span><?php echo single_topic(); ?></span>
  18.                 </div>     
  19.                 <div class="item-headline"><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></div>
  20.  
  21.             </div>
  22.            
  23.             <div class="item-meta">
  24.                        
  25.                 <div class="item-date">
  26.                     <time datetime="<?php the_time('Y-m-d H:i:s'); ?>" itemprop="datePublished">
  27.                     <?php the_time('F d, Y'); ?>
  28.                     </time>
  29.                 </div>
  30.                 <div class="item-author">от <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a></div>
  31.  
  32.             </div>
  33.  
  34.         </div>
  35.  
  36.     </div>
  37.     <!-- top articles -->
  38.     <?php wp_reset_postdata(); ?>
  39.     <?php endif; ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top