Guest User

Untitled

a guest
Jul 6th, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 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 ( $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. break;
  49.  
  50. case 'Service Section':
  51.  
  52. /*====== get service template ======*/
  53.  
  54. get_template_part('index', 'service');
  55.  
  56.  
  57. break;
  58.  
  59.  
  60. case 'Project Section':
  61.  
  62. /*====== get index project ======*/
  63.  
  64. get_template_part('index', 'project');
  65.  
  66. break;
  67.  
  68.  
  69. case 'Blog Section':
  70.  
  71. /*====== get index blog ======*/
  72.  
  73. get_template_part('index', 'blog');
  74.  
  75. break;
  76.  
  77. case 'Team Section':
  78.  
  79. /*====== get index team ======*/
  80.  
  81. get_template_part('index', 'team');
  82.  
  83. break;
  84.  
  85.  
  86. case 'Testimonials Section':
  87.  
  88. /*====== get testimonial template ======*/
  89.  
  90. get_template_part('index', 'testimonials');
  91.  
  92. break;
  93.  
  94. case 'Client Strip':
  95.  
  96. /*====== get client template ======*/
  97.  
  98. get_template_part('index', 'clientstrip');
  99.  
  100. break;
  101. }
  102. if($value=='Testimonials Section'){
  103. get_template_part('index', 'my_selected_projects');
  104. }
  105. }
  106. }
  107.  
  108. get_footer();
  109. }
Add Comment
Please, Sign In to add comment