Guest User

Untitled

a guest
Nov 12th, 2018
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. * Template Name: Home
  4. */
  5.  
  6. $current_options = wp_parse_args( get_option( 'busiprof_pro_theme_options', array() ), theme_data_setup() );
  7.  
  8. if ( $current_options['front_page'] != 'yes' )
  9. {
  10.  
  11. get_template_part('index');
  12.  
  13. }
  14. else
  15. {
  16. get_header();
  17.  
  18. $data = array();
  19.  
  20. $data[] = $current_options['busi_layout_section1'];
  21.  
  22. $data[] = $current_options['busi_layout_section2'];
  23.  
  24. $data[] = $current_options['busi_layout_section3'];
  25.  
  26. $data[] = $current_options['busi_layout_section4'];
  27.  
  28. $data[] = $current_options['busi_layout_section5'];
  29.  
  30. $data[] = $current_options['busi_layout_section6'];
  31.  
  32. $data[] = $current_options['busi_layout_section7'];
  33.  
  34.  
  35. if($data)
  36. {
  37. foreach($data as $key=>$value)
  38. {
  39. switch($value)
  40. {
  41.  
  42. case 'slider':
  43.  
  44. /*====== get slider template ======*/
  45.  
  46. get_template_part('index', 'slider') ;
  47.  
  48.  
  49. break;
  50.  
  51. case 'Service Section':
  52.  
  53. /*====== get service template ======*/
  54.  
  55. get_template_part('index', 'service');
  56. get_template_part('index', 'slider2');
  57.  
  58. break;
  59.  
  60.  
  61. case 'Project Section':
  62.  
  63. /*====== get index project ======*/
  64.  
  65. get_template_part('index', 'project');
  66.  
  67. break;
  68.  
  69.  
  70. case 'Blog Section':
  71.  
  72. /*====== get index blog ======*/
  73.  
  74. get_template_part('index', 'blog');
  75.  
  76. break;
  77.  
  78. case 'Team Section':
  79.  
  80. /*====== get index team ======*/
  81.  
  82. get_template_part('index', 'team');
  83.  
  84. break;
  85.  
  86.  
  87. case 'Testimonials Section':
  88.  
  89. /*====== get testimonial template ======*/
  90.  
  91. get_template_part('index', 'testimonials');
  92.  
  93. break;
  94.  
  95. case 'Client Strip':
  96.  
  97. /*====== get client template ======*/
  98.  
  99. get_template_part('index', 'clientstrip');
  100.  
  101. break;
  102. }
  103. }
  104. }
  105.  
  106. get_footer();
  107. }
RAW Paste Data