Advertisement
Guest User

Avenue WP Index.php BuddyPress

a guest
Sep 24th, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.18 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <!-- BEGIN MAIN -->
  4. <div id="main">
  5.  
  6. <?php if(get_option('pyre_featured_slider') == 'On' && get_option('pyre_featured_tags')): ?>
  7. <?php
  8. $post_types = get_post_types();
  9. unset($post_types['page'], $post_types['attachment'], $post_types['revision'], $post_types['nav_menu_item']);
  10.  
  11. $featured_posts = new WP_Query(array(
  12. 'post_type' => $post_types,
  13. 'showposts' => 5,
  14. 'tag' => get_option('pyre_featured_tags')
  15. ));
  16. ?>
  17. <!-- BEGIN WRAPPER-FEATURED -->
  18. <div id="wrapper-featured">
  19.  
  20. <div id="wrapper-slides">
  21.  
  22. <div id="slider" class="nivoSlider"><?php
  23. //Code automatically inserted by Featurific for Wordpress plugin
  24. if(is_home()) //If we're generating the home page (remove this line to make Featurific appear on all pages)...
  25. if(function_exists('insert_featurific')) //If the Featurific plugin is activated...
  26. insert_featurific(); //Insert the HTML code to embed Featurific
  27. ?>
  28. <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>
  29. <?php if(has_post_thumbnail()): ?>
  30. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'featured-image'); ?>
  31. <?php $image_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'featured-image-thumb'); ?>
  32. <a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" title="#htmlcaption_<?php the_ID(); ?>" rel="<?php echo $image_thumb[0]; ?>" width='516' height='340' /></a>
  33. <?php else: ?>
  34. <a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/thumbnail.png&w=516&h=340" alt="<?php the_title(); ?>" title="#htmlcaption_<?php the_ID(); ?>" rel="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/thumbnail.png&w=70&h=60" width='516' height='340' /></a>
  35. <?php endif; ?>
  36. <?php endwhile; ?>
  37. </div>
  38.  
  39. <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>
  40. <div class="nivo-html-caption" id="htmlcaption_<?php the_ID(); ?>">
  41. <h1><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><?php the_title(); ?></a></h1>
  42. <p><?php echo string_limit_words(get_the_excerpt(), 15); ?> <span class="block-arrows"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'>&raquo;</a></span></p>
  43. </div>
  44. <?php endwhile; ?>
  45.  
  46. </div>
  47.  
  48. </div>
  49. <!-- END WRAPPER-FEATURED -->
  50. <?php endif; ?>
  51.  
  52. <!-- BEGIN HOMEPAGE BLOCKS -->
  53. <?php if(get_option('pyre_homepage_style') == 'magazine'): ?>
  54. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage')): ?>
  55. <div class="block full">
  56.  
  57. <h3><?php _e('Recent Posts', 'Avenue'); ?> <span class="arrows">&raquo;</span></h3>
  58.  
  59. <?php
  60. $recent_posts = new WP_Query(array(
  61. 'showposts' => 4,
  62. ));
  63. ?>
  64. <?php
  65. $big_count = round(4 / 4);
  66. if(!$big_count) { $big_count = 1; }
  67. ?>
  68. <?php $counter = 1; while($recent_posts->have_posts()): $recent_posts->the_post(); ?>
  69. <?php
  70. if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
  71. $icon = '<span class="' . get_post_format($post->ID) . '-icon"></span>';
  72. } else {
  73. $icon = '';
  74. }
  75. ?>
  76. <?php if($counter <= $big_count): ?>
  77. <div class="block-item-big">
  78. <?php if(has_post_thumbnail()): ?>
  79. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'widget-image'); ?>
  80. <div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width='290' height='160' /></a><?php echo $icon; ?></div>
  81. <?php else: ?>
  82. <div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/thumbnail.png&w=290&h=160" alt="<?php the_title(); ?>" width='290' height='160' /></a><?php echo $icon; ?></div>
  83. <?php endif; ?>
  84. <h2><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><?php the_title(); ?></a></h2>
  85. <span class="block-meta"><?php the_time('F j, Y'); ?>, <?php comments_popup_link(); ?></span>
  86. </div>
  87. <?php else: ?>
  88. <div class="block-item-small">
  89. <?php if(has_post_thumbnail()): ?>
  90. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'widget-image-thumb'); ?>
  91. <div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width='50' height='50' /></a><?php echo $icon; ?></div>
  92. <?php else: ?>
  93. <div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/thumbnail.png&w=60&h=60" alt="<?php the_title(); ?>" width='50' height='50' /></a><?php echo $icon; ?></div>
  94. <?php endif; ?>
  95. <h2><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><?php the_title(); ?></a></h2>
  96. <span class="block-meta"><?php the_time('F j, Y'); ?>, <?php comments_popup_link(); ?></span>
  97. </div>
  98. <?php endif; ?>
  99. <?php $counter++; endwhile; ?>
  100.  
  101. </div>
  102. <?php endif; ?>
  103. <?php endif; ?>
  104.  
  105. <?php if(get_option('pyre_homepage_style') == 'blog'): ?>
  106. <div class="block archive">
  107.  
  108. <h3>
  109. <?php _e('Recent Posts', 'Avenue'); ?>
  110. <span class="arrows">&raquo;</span>
  111. </h3>
  112.  
  113. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  114. <div id="post-<?php the_ID(); ?>" <?php post_class('block-item-big'); ?>>
  115. <?php
  116. if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
  117. $icon = '<span class="' . get_post_format($post->ID) . '-icon"></span>';
  118. } else {
  119. $icon = '';
  120. }
  121. ?>
  122. <?php if(has_post_thumbnail()): ?>
  123. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'widget-image'); ?>
  124. <div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width='290' height='160' /></a><?php echo $icon; ?></div>
  125. <?php else: ?>
  126. <div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/thumbnail.png&w=290&h=160" alt="<?php the_title(); ?>" width='290' height='160' /></a><?php echo $icon; ?></div>
  127. <?php endif; ?>
  128. <h2><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><?php the_title(); ?></a></h2>
  129. <span class="block-meta">
  130. <span class="heading-author"><?php the_author(); ?></span>
  131. <span class="heading-date"><?php the_time('F j, Y'); ?></span>
  132. <span class="heading-comments"><?php comments_popup_link('0','1','%'); ?></span>
  133. </span>
  134. <p><?php echo string_limit_words(get_the_excerpt(), 34); ?></p><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>' class="readmore"><?php _e('Read More', 'Avenue'); ?> <span class="block-arrows">&raquo;</span></a>
  135. </div>
  136. <?php endwhile; endif; ?>
  137.  
  138. <?php kriesi_pagination($pages = '', $range = 2); ?>
  139. </div>
  140.  
  141. <div class='block full' style='padding-top: 20px;'>
  142. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage (Blog Style)')): ?>
  143. <?php endif; ?>
  144. </div>
  145. <?php endif; ?>
  146. <!-- END HOMEPAGE BLOCKS -->
  147.  
  148. </div>
  149. <!-- END MAIN -->
  150.  
  151. <?php get_sidebar(); ?>
  152.  
  153. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement