Guest User

Untitled

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