Advertisement
Guest User

Hub Code

a guest
Jun 6th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.01 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Hub
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9. <div id="content">
  10. <div id="contentwide"> <h1><?php the_title(); ?> <b>Hub</b></a></h1><i><?php meta('hubdescription'); ?> </i></div>
  11. <div id="featureimg"></br clear="all"><?php the_post_thumbnail( 'hubheader' ); ?></div>
  12.  
  13.  
  14.  
  15. <div class="hubads"> <img src="http://enconnected.com/wp-content/uploads/2012/04/xboxhub1.png"> </div>
  16.  
  17. <div class="hubcontent">
  18.  
  19. <?php $wp_query = new WP_Query(array('showposts'=>12,'paged'=>$paged)); ?>
  20. <?php $cat_id = get_post_meta($post->ID,'hubcategory',true); query_posts(array('cat' => $cat_id); ?>
  21. <?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>
  22.  
  23. <?php global $more; $more = 0; ?>
  24.  
  25.  
  26.  
  27. <div id="hubcontentitem"><h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4></div>
  28. <?php endwhile; ?>
  29. <?php else : // do not delete ?>
  30. <?php endif; // do not delete ?>
  31.  
  32.  
  33.  
  34. <div id="hubnation">
  35. <div id="prevLink"><p><a href="http://enconnected.com/news/page/2/">Browse all news</a></p></div>
  36. </div>
  37.  
  38.  
  39. </div>
  40.  
  41. <br clear='all' /> <br clear='all' />
  42. <h2>&nbsp; Xbox related reviews</h2>
  43. <?php query_posts( array( 'post_type' => 'reviews', 'posts_per_page' => 1 ) ); ?>
  44. <?php query_posts('reviewdevices=xbox-360&posts_per_page=1'); ?>
  45.  
  46. <?php $post_class = 'first'; ?>
  47. <?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>
  48. <?php $meta_box = get_post_custom($post->ID); $video = $meta_box['custom_meta_video'][0]; ?>
  49. <?php global $more; $more = 0; ?>
  50.  
  51. <div class="portfolio <?php echo $post_class; ?>">
  52.  
  53. <?php
  54. if ('first' == $post_class){
  55. $post_class = 'second';
  56. }elseif ('second' == $post_class){
  57. $post_class = 'third';
  58. }else{
  59. $post_class = 'first';
  60. }
  61. ?>
  62.  
  63.  
  64. <a class="portfolioimg" href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail( 'portfolio' ); ?></a>
  65. <div class="portfoliocontent">
  66. <h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
  67.  
  68. </div>
  69.  
  70. </div>
  71.  
  72. <?php endwhile; ?>
  73.  
  74.  
  75. <?php else : // do not delete ?>
  76.  
  77. <h3><?php _e("Page not Found", 'organicthemes'); ?></h3>
  78. <p><?php _e("We're sorry, but the page you're looking for isn't here.", 'organicthemes'); ?></p>
  79. <p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar", 'organicthemes'); ?></p>
  80.  
  81. <?php endif; // do not delete ?>
  82.  
  83.  
  84. <div class="hubsocialcontent"> <div id="herohub" class="herohub"><a href="http://enconnected.com/social"><img src="http://enconnected.com/wp-content/uploads/2011/07/crowd.jpg"></a> <h1><a href="http://enConnected.com">Talk Xbox in enConnected Social</a></h1></div> </div>
  85.  
  86.  
  87. <br clear='all' /> <br clear='all' />
  88. <h2>&nbsp; The latest in Xbox related articles from our editors</h2>
  89. <?php query_posts( array( 'post_type' => 'articles', 'posts_per_page' => 6 ) ); ?>
  90. <?php query_posts('articleconcerning=xbox-3&posts_per_page=3'); ?>
  91. <?php $post_class = 'first'; ?>
  92. <?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>
  93. <?php $meta_box = get_post_custom($post->ID); $video = $meta_box['custom_meta_video'][0]; ?>
  94. <?php global $more; $more = 0; ?>
  95.  
  96. <div class="portfolio <?php echo $post_class; ?>">
  97.  
  98. <?php
  99. if ('first' == $post_class){
  100. $post_class = 'second';
  101. }elseif ('second' == $post_class){
  102. $post_class = 'third';
  103. }else{
  104. $post_class = 'first';
  105. }
  106. ?>
  107.  
  108.  
  109. <a class="portfolioimg" href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail( 'portfolio' ); ?></a>
  110. <div class="portfoliocontent">
  111. <h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
  112. <p><?php the_excerpt(); ?></p>
  113. </div>
  114.  
  115. </div>
  116.  
  117. <?php endwhile; ?>
  118.  
  119.  
  120.  
  121. <?php else : // do not delete ?>
  122.  
  123. <h3><?php _e("Page not Found", 'organicthemes'); ?></h3>
  124. <p><?php _e("We're sorry, but the page you're looking for isn't here.", 'organicthemes'); ?></p>
  125. <p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar", 'organicthemes'); ?></p>
  126.  
  127. <?php endif; // do not delete ?>
  128.  
  129.  
  130.  
  131. <br clear='all' /> <br clear='all' />
  132. <h2>&nbsp; The latest in Xbox related videos from our editors</h2>
  133. <?php query_posts( array( 'post_type' => 'videos', 'posts_per_page' => 3 ) ); ?>
  134. <?php query_posts('videoconcerning=xbox-4&posts_per_page=3'); ?>
  135. <?php $post_class = 'first'; ?>
  136. <?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>
  137. <?php $meta_box = get_post_custom($post->ID); $video = $meta_box['custom_meta_video'][0]; ?>
  138. <?php global $more; $more = 0; ?>
  139.  
  140. <div class="portfolio <?php echo $post_class; ?>">
  141.  
  142. <?php
  143. if ('first' == $post_class){
  144. $post_class = 'second';
  145. }elseif ('second' == $post_class){
  146. $post_class = 'third';
  147. }else{
  148. $post_class = 'first';
  149. }
  150. ?>
  151.  
  152.  
  153. <a class="portfolioimg" href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail( 'portfolio' ); ?></a>
  154. <div class="portfoliocontent">
  155. <h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
  156. <p><?php the_excerpt(); ?></p>
  157. </div>
  158.  
  159. </div>
  160.  
  161. <?php endwhile; ?>
  162.  
  163.  
  164.  
  165. <?php else : // do not delete ?>
  166.  
  167. <h3><?php _e("Page not Found", 'organicthemes'); ?></h3>
  168. <p><?php _e("We're sorry, but the page you're looking for isn't here.", 'organicthemes'); ?></p>
  169. <p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar", 'organicthemes'); ?></p>
  170.  
  171. <?php endif; // do not delete ?>
  172.  
  173.  
  174. </div>
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. <!-- The main column ends -->
  182.  
  183. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement