Advertisement
Guest User

home.php

a guest
Jul 12th, 2011
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4. $stickies = get_option('sticky_posts');
  5. rsort($stickies);
  6.  
  7. $slideshow_cat = arras_get_option('slideshow_cat');
  8. $featured1_cat = arras_get_option('featured1_cat');
  9. $featured2_cat = arras_get_option('featured2_cat');
  10. $news_cat = arras_get_option('news_cat');
  11.  
  12. $slideshow_count = (int)arras_get_option('slideshow_count');
  13. $featured1_count = (int)arras_get_option('featured1_count');
  14. $featured2_count = (int)arras_get_option('featured2_count');
  15.  
  16. $post_blacklist = array();
  17. ?>
  18.  
  19. <div id="content" class="section">
  20. <?php arras_above_content() ?>
  21.  
  22. <?php if (!$paged) : ?>
  23.  
  24. <?php if ( $featured1_cat !== '' && arras_get_option('enable_featured1') ) : ?>
  25. <?php arras_above_index_featured1_post() ?>
  26. <!-- Featured Articles #1 -->
  27. <div id="index-featured1">
  28. <?php if ( arras_get_option('featured1_title') != '' ) : ?>
  29. <div class="home-title"><?php _e( arras_get_option('featured1_title'), 'arras' ) ?></div>
  30. <?php endif ?>
  31. <?php
  32. $query2 = arras_parse_query($featured1_cat, $featured1_count, array_unique($post_blacklist), arras_get_option('featured1_posttype'), arras_get_option('featured1_tax'));
  33. arras_render_posts( apply_filters('arras_featured1_query', $query2), arras_get_option('featured1_display'), arras_get_option('featured1_tax') );
  34. ?>
  35. </div><!-- #index-featured1 -->
  36. <?php endif; ?>
  37.  
  38. <?php if ( $featured2_cat !== '' && arras_get_option('enable_featured2') ) : ?>
  39. <?php arras_above_index_featured2_post() ?>
  40. <!-- Featured Articles #2 -->
  41. <div id="index-featured2">
  42. <?php if ( arras_get_option('featured2_title') != '' ) : ?>
  43. <div class="home-title"><?php _e( arras_get_option('featured2_title'), 'arras' ) ?></div>
  44. <?php endif ?>
  45. <?php
  46. $query3 = arras_parse_query($featured2_cat, $featured2_count, array_unique($post_blacklist), arras_get_option('featured2_posttype'), arras_get_option('featured2_tax'));
  47. arras_render_posts( apply_filters('arras_featured2_query', $query3), arras_get_option('featured2_display'), arras_get_option('featured2_tax') );
  48. ?>
  49. </div><!-- #index-featured2 -->
  50. <?php endif; ?>
  51.  
  52. <?php if ( arras_get_option('enable_news') ) : ?>
  53. <?php arras_above_index_news_post() ?>
  54. <!-- News Articles -->
  55. <div id="index-news">
  56. <?php if ( arras_get_option('news_title') != '' ) : ?>
  57. <div class="home-title"><?php _e( arras_get_option('news_title') ) ?></div>
  58. <?php endif ?>
  59. <?php
  60. $news_query = arras_parse_query($news_cat, ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) ), array_unique($post_blacklist), arras_get_option('news_posttype'), arras_get_option('news_tax'));
  61.  
  62. $news_query['paged'] = $paged;
  63.  
  64. query_posts( apply_filters('arras_news_query', $news_query) );
  65. arras_render_posts( null, arras_get_option('news_display'), arras_get_option('news_tax') ); ?>
  66. <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
  67. <div class="navigation clearfix">
  68. <div class="floatleft"><?php next_posts_link( __('Oudere berichten', 'arras') ) ?></div>
  69. <div class="floatright"><?php previous_posts_link( __('Nieuwere berichten', 'arras') ) ?></div>
  70. </div>
  71. <?php } ?>
  72.  
  73. </div><!-- #index-news -->
  74. <?php arras_below_index_news_post() ?>
  75. <?php endif; ?>
  76.  
  77. <?php $sidebars = wp_get_sidebars_widgets(); ?>
  78.  
  79. <div id="bottom-content-1">
  80. <?php if ( isset($sidebars['sidebar-4']) ) : ?>
  81. <ul class="clearfix xoxo">
  82. <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #1') ) : ?>
  83. <li></li>
  84. <?php endif; ?>
  85. </ul>
  86. <?php endif; ?>
  87. </div>
  88.  
  89. <div id="bottom-content-2">
  90. <?php if ( isset($sidebars['sidebar-5']) ) : ?>
  91. <ul class="clearfix xoxo">
  92. <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
  93. <li></li>
  94. <?php endif; ?>
  95. </ul>
  96. <?php endif; ?>
  97. </div>
  98.  
  99. <?php else: ?>
  100.  
  101. <div class="home-title"><?php _e('Laatste betichten', 'arras') ?></div>
  102.  
  103. <div id="archive-posts">
  104. <?php arras_render_posts(null, arras_get_option('archive_display')) ?>
  105.  
  106. <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
  107. <div class="navigation clearfix">
  108. <div class="floatleft"><?php next_posts_link( __('Oudere berichten', 'arras') ) ?></div>
  109. <div class="floatright"><?php previous_posts_link( __('Nieuwere berichten', 'arras') ) ?></div>
  110. </div>
  111. <?php } ?>
  112. </div><!-- #archive-posts -->
  113.  
  114. <?php endif; ?>
  115.  
  116. <?php arras_below_content() ?>
  117. </div><!-- #content -->
  118.  
  119. <?php get_sidebar(); ?>
  120. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement