Advertisement
Guest User

Untitled

a guest
Oct 30th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. <?php
  2. /**
  3. * Index Template
  4. *
  5. * Here we setup all logic and XHTML that is required for the index template, used as both the homepage
  6. * and as a fallback template, if a more appropriate template file doesn't exist for a specific context.
  7. *
  8. * @package WooFramework
  9. * @subpackage Template
  10. */
  11. get_header();
  12. global $slider_counter;
  13. /**
  14. * The Variables
  15. *
  16. * Setup default variables, overriding them if the "Theme Options" have been saved.
  17. */
  18.  
  19. $settings = array(
  20. 'featured' => 'true',
  21. 'custom_intro_message' => 'true',
  22. 'features_area' => 'true',
  23. 'content_area' => 'false',
  24. 'blog_area' => 'false',
  25. 'home_portfolio' => 'true',
  26. 'home_promotion' => 'true',
  27. 'home_feedback' => 'true',
  28. 'shop_area' => 'false'
  29. );
  30.  
  31. $settings = woo_get_dynamic_values( $settings );
  32.  
  33. ?>
  34.  
  35. <div id="content" class="col-full">
  36.  
  37. <?php
  38. /* Make sure we switch to the selected layout if a custom layout isn't set. */
  39. if ( ! is_active_sidebar( 'homepage' ) ) {
  40.  
  41. // Output the Slider Area
  42. if ( ( is_home() || is_front_page() ) && !$paged && isset( $woo_options['woo_featured'] ) && $woo_options['woo_featured'] == 'true' ) {
  43. $slider_counter = 1;
  44. get_template_part ( 'includes/homepage-slider-panel' );
  45. }
  46.  
  47. // Output the Intro Area
  48. if ( !$paged && $settings['custom_intro_message'] == 'true' ) { get_template_part( 'includes/homepage-intro-panel' ); }
  49.  
  50. // Output the Features Area
  51. if ( !$paged && $settings['features_area'] == 'true' ) { get_template_part( 'includes/homepage-features-panel' ); }
  52.  
  53. // Output the Portfolio Area
  54. if ( $settings['home_portfolio'] == 'true' ) { get_template_part( 'includes/homepage-portfolio-panel' ); }
  55.  
  56. // Output the Banner Area
  57. if ( $settings['home_promotion'] == 'true' ) { get_template_part( 'includes/homepage-promotion-panel' ); }
  58.  
  59. // Output the Feedback Area
  60. if ( $settings['home_feedback'] == 'true' ) { get_template_part( 'includes/homepage-feedback-panel' ); }
  61.  
  62. // Output the Shop Area if WooCommerce is installed
  63. if ( $settings['shop_area'] == 'true' && is_woocommerce_activated() ) { get_template_part( 'includes/homepage-shop-panel' ); }
  64.  
  65. // Output the Content Area
  66. if ( $settings['content_area'] == 'true' ) { get_template_part( 'includes/homepage-content-panel' ); }
  67.  
  68. // Output the Blog Area
  69. if ( $settings['blog_area'] == 'true' ) { get_template_part( 'includes/homepage-blog-panel' ); }
  70.  
  71. } else {
  72.  
  73. // Output the Widgetized Area
  74. dynamic_sidebar( 'homepage' );
  75.  
  76. } // End If Statement
  77. ?>
  78.  
  79. </div><!-- /#content -->
  80.  
  81. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement