Want more features on Pastebin? Sign Up, it's FREE!
Guest

Wordpress SEO

By: a guest on May 22nd, 2011  |  syntax: None  |  size: 7.82 KB  |  views: 48  |  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. Home.php
  2.  
  3.  
  4. <?php get_header(); ?>
  5.  
  6. <div class="col12">
  7.  
  8.                         <div id="homepage">
  9.  
  10.                         <?php
  11.                         /* Run the loop to output the posts.
  12.                          * If you want to overload this in a child theme then include a file
  13.                          * called loop-index.php and that will be used instead.
  14.                          */
  15.                          get_template_part( 'loop', 'home' );
  16.                         ?>
  17.                         </div><!-- #homepage -->
  18.         </div>
  19. <?php get_footer(); ?>
  20.  
  21.  
  22. loop-home.php
  23.  
  24.  
  25.  
  26.  
  27. <div id="row1">
  28. <div class="col3">
  29. <?php query_posts( 'posts_per_page=1&category_name=reviews' ); ?>
  30. <?php while ( have_posts() ) : the_post(); ?>
  31. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  32.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(250,250)); } ?></a>              
  33.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  34. </div><!-- #post-## -->
  35. <?php endwhile; // End the loop. Whew. ?>
  36. <?php rewind_posts(); ?>
  37. </div><!--col3-->
  38.  
  39. <div class="col3">
  40. <?php query_posts( 'posts_per_page=1&category_name=reviews&offset=1' ); ?>
  41. <?php while ( have_posts() ) : the_post(); ?>
  42. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  43.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(250,250)); } ?></a>              
  44.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  45. </div><!-- #post-## -->
  46. <?php endwhile; // End the loop. Whew. ?>
  47. <?php rewind_posts(); ?>
  48. </div><!--col3-->
  49.  
  50. <div class="col3">
  51. <?php query_posts( 'posts_per_page=1&category_name=reviews&offset=2' ); ?>
  52. <?php while ( have_posts() ) : the_post(); ?>
  53. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  54.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(250,250)); } ?></a>              
  55.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  56. </div><!-- #post-## -->
  57. <?php endwhile; // End the loop. Whew. ?>
  58. <?php rewind_posts(); ?>
  59. </div><!--col3-->
  60.  
  61. <div class="col3">
  62. <?php query_posts( 'posts_per_page=1&category_name=reviews&offset=3' ); ?>
  63. <?php while ( have_posts() ) : the_post(); ?>
  64. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  65.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(250,250)); } ?></a>              
  66.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  67. </div><!-- #post-## -->
  68. <?php endwhile; // End the loop. Whew. ?>
  69. <?php rewind_posts(); ?>
  70. </div><!--col3-->
  71. </div><!--row1-->
  72.  
  73. <div id="row2">
  74. <div class="col3">
  75. <a href="http://booktrib.com" target="_blank"><img src="/images/book-trib-thumb.jpg"></a>
  76. <h3 class="homepage-subtitle"><a href="http://booktrib.com" target="_blank">Reviews from our friends at Book Trib</a></h3>
  77. <?php if(function_exists('fetch_feed')) {
  78.  
  79.         include_once(ABSPATH . WPINC . '/feed.php');               // include the required file
  80.         $feed = fetch_feed('http://booktrib.com/feed/'); // specify the source feed
  81.  
  82.         $limit = $feed->get_item_quantity(5); // specify number of items
  83.         $items = $feed->get_items(0, $limit); // create an array of items
  84.  
  85. }
  86. if ($limit == 0) echo '<div>The feed is either empty or unavailable.</div>';
  87. else foreach ($items as $item) : ?>
  88. <ul class="homepage">
  89.         <a href="<?php echo $item->get_permalink(); ?>"
  90.           title="<?php echo $item->get_date('j F Y @ g:i a'); ?>" target="_blank">
  91.                 <?php echo $item->get_title(); ?>
  92.         </a>
  93. </ul>
  94. <?php endforeach; ?>
  95. </div><!--col3-->
  96.  
  97. <div class="col3">
  98. <a href="http://www.bluearchipelagoreviews.com/review/twilight-saga/"><img src="/images/twilight-thumb.jpg"></a>
  99. <h3 class="homepage-subtitle"><a href="http://www.bluearchipelagoreviews.com/review/twilight-saga/">Twilight news and reviews</a></h3>
  100. <?php
  101. query_posts('posts_per_page=5&category_name=twilight-saga');
  102. while(have_posts()) : the_post();
  103. ?>
  104. <ul>
  105. <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
  106. </ul>
  107. <?php endwhile; // End the loop. Whew. ?>
  108. <?php rewind_posts(); ?></div><!-- col3-->
  109.  
  110. <div class="col3">
  111. <?php
  112. query_posts('posts_per_page=1&category_name=interviews');
  113. while(have_posts()) : the_post();
  114. ?>
  115. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  116.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(200,200)); } ?></a>              
  117.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  118.  
  119. </div><!-- #post-## -->
  120. <?php endwhile; // End the loop. Whew. ?>
  121. </div><!-- col3-->
  122. <div class="col3">
  123. <?php
  124. query_posts('posts_per_page=1&category_name=interviews&offset=1');
  125. while(have_posts()) : the_post();
  126. ?>
  127. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  128.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(200,200)); } ?></a>              
  129.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  130.  
  131. </div><!-- #post-## -->
  132. <?php endwhile; // End the loop. Whew. ?>
  133. </div><!-- col3-->
  134. </div><!-- row2 -->
  135.  
  136. <div id="row3">
  137. <div class="col6">
  138. <?php
  139. query_posts('p=942');
  140. while(have_posts()) : the_post();
  141. ?>
  142. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  143. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img src="/images/kindle-thumb.jpg"></a>
  144.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  145.         <?php the_excerpt(); ?>
  146.  
  147. </div><!-- #post-## -->
  148. <?php endwhile; // End the loop. Whew. ?>
  149. <?php rewind_posts(); ?></div><!--col6-->
  150.  
  151. <div class="col6">
  152. <?php
  153. query_posts('p=1520');
  154. while(have_posts()) : the_post();
  155. ?>
  156. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  157. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img src="/images/kindle3g-cases-covers-thumb.jpg"></a>
  158.         <h3 class="homepage-subtitle"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'seven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  159.         <?php the_excerpt(); ?>
  160.  
  161. </div><!-- #post-## -->
  162. <?php endwhile; // End the loop. Whew. ?>
  163. <?php rewind_posts(); ?></div><!--col6-->
  164. </div><!--row3-->
clone this paste RAW Paste Data