Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 15.18 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: Projects
  4.  */
  5. the_post();
  6. ?>
  7.  
  8. <?php get_template_part('templates/temp/project-banner');?>
  9. <?php
  10. $pb_content                   = get_field('pb_content');
  11. $pb_logo                      = get_field('pb_logo');
  12. $pb_gray_box_picture          = get_field('pb_gray_box_picture');
  13. $pb_gray_box_person           = get_field('pb_gray_box_person');
  14. $pb_gray_box_occupation       = get_field('pb_gray_box_occupation');
  15. $pb_gray_box_occupation_title = get_field('pb_gray_box_occupation_title');
  16. $pb_gray_box_content          = get_field('pb_gray_box_content');
  17. $pb_gray_box_below_content    = get_field('pb_gray_box_below_content');
  18.  
  19. $ga_title                         = get_field('ga_title');
  20. $ga_left_picture                  = get_field('ga_left_picture');
  21. $ga_person                        = get_field('ga_person');
  22. $ga_occupation                    = get_field('ga_occupation');
  23. $ga_occupation_title              = get_field('ga_occupation_title');
  24. $ga_content                       = get_field('ga_content');
  25. $ga_experience_box_title          = get_field('ga_experience_box_title');
  26. $ga_experience_box_list           = get_field('ga_experience_box_list');
  27. $ga_view_profile_url              = get_field('ga_view_profile_url');
  28. $ga_view_profile_project_title    = get_field('pb_project_title');
  29. $ga_view_profile_project_subtitle = get_field('pb_project_subtitle');
  30.  
  31. // dynamic mentor data
  32. $project_mentor = get_field( 'project_mentor' );
  33. $project_mentor_image = wp_get_attachment_image_src( get_post_thumbnail_id(  $project_mentor[0]->ID ) );
  34. $project_mentor_name = get_the_title( $project_mentor[0]->ID );
  35. $project_mentor_detail = apply_filters('the_content', get_post_field('post_content', $project_mentor[0]->ID ));
  36. $project_mentor_position = get_field( 'mentor_designation', $project_mentor[0]->ID );
  37. $project_mentor_company_name = get_field( 'mentor_company_name', $project_mentor[0]->ID );
  38. $project_mentor_linkedin_profile = get_field( 'linkedin_profile', $project_mentor[0]->ID );
  39. $project_company = get_field( 'project_company' );
  40. $project_mentor_experience = get_field( 'mentor_experience', $project_mentor[0]->ID );
  41. $project_mentor_experience_title = get_field( 'mentor_experience_title', $project_mentor[0]->ID );
  42. $project_mentor_experience_title = get_field( 'mentor_experience_title', $project_mentor[0]->ID );
  43. //dynamic company data
  44. $project_company = get_field( 'project_company' );
  45. $project_company_id = $project_company['company']['select_company'][0]->ID;
  46. $project_company_image = wp_get_attachment_image_src( get_post_thumbnail_id(  $project_company_id ) );
  47. $project_company_name = get_the_title( $project_company_id );
  48. $project_company_detail = get_field( 'company_detail', $project_company_id );
  49. $project_company_small_image = $project_company_detail['small_image']['url'];
  50. $project_company_small_text = $project_company_detail['small_text'];
  51. $project_company_subheading = $project_company_detail['subheading'];
  52. $project_company_introduction_text = $project_company_detail['introduction_text'];
  53. $project_company_brief_heading = $project_company_detail['company_brief_heading'];
  54. $project_company_brief = $project_company_detail['company_brief'];
  55. $project_company_list_title = $project_company_detail['list_title'];
  56. $project_company_list = $project_company_detail['project_deliverables_list'];
  57. $project_company_website_link = $project_company_detail['website_link'];
  58.  
  59. ?>
  60. <div id="the-project-brief" class="background__white the-project-brief">
  61.     <div class="container">
  62.         <div class="row">
  63.             <div class="col-12 col-md-6">
  64.                 <div class="the-project-brief__wrapper">
  65.                     <div class="the-project-brief__wrapper--header">
  66.                         <div class="the-project-brief__wrapper--header__logo">
  67.                             <?php if ($project_company): ?>
  68.                                 <div class="c-project-sidebar__logo text-center">
  69.                                     <img src="<?php echo $project_company_image[0]; ?>" alt="" class="img-fluid rounded-circle">
  70.                                 </div>
  71.                             <?php endif; ?>
  72.                         </div>
  73.                         <div class="the-project-brief__wrapper--header__details">
  74.                             <h2 class="h2-bold"><?php echo $project_company_name; ?></h2>
  75.                             <div class="the-project-brief__wrapper--header__details--sub"><?php echo $project_company_subheading; ?></div>
  76.                         </div>
  77.                     </div>
  78.                     <div class="the-project-brief__wrapper--content c-content-same-height">
  79.                         <div class="">
  80.                             <div class="the-project-brief__wrapper--top">
  81.                                 <div class="c-image__holder">
  82.                                     <img src="<?php echo $project_company_small_image;?>">
  83.                                 </div>
  84.                                 <div class="c-text__wrap">
  85.                                     <?php echo $project_company_small_text;?>
  86.                                 </div>
  87.                             </div>
  88.                         <p><?php echo esc_attr($project_company_introduction_text);?></p>
  89.                         <strong><?php echo esc_attr($project_company_brief_heading);?></strong>
  90.                         <?php echo $project_company_brief;?>
  91.  
  92.                         <strong><?php echo esc_attr($project_company_list_title);?></strong>
  93.                         <ul>
  94.                         <?php if( $project_company_list ){
  95.                             foreach(  $project_company_list as  $list ){
  96.                                 ?>
  97.                                     <li><?php echo esc_attr($list['text']); ?></li>
  98.                                 <?php
  99.                             }
  100.                         } ?>
  101.                         </ul>
  102.                         <?php if( isset( $project_company_website_link['title'] ) && !empty( $project_company_website_link['title'] ) ){ ?>
  103.                             <div class="btn__holder">
  104.                                 <a href="<?php echo $project_company_website_link["link"];?>" target="<?php echo $project_company_website_link["link"];?>">
  105.                                      <?php echo $project_company_website_link['title'];?><img src="https://localhost/harness/wp-content/themes/harness/assets/images/2019/ico-arrow-right.svg" width="19" height="8" alt="arrow">
  106.                                  </a>
  107.                             </div>
  108.                         <?php } ?>
  109.  
  110.                         </div>
  111.                         <?php //echo $pb_content ?>
  112.                     </div>
  113.                 </div>
  114.             </div>
  115.             <div class="col-12 col-md-6">
  116.                 <div class="c-project-sidebar">
  117.                     <div class="c-project-sidebar__header">
  118.                         <div class="c-project-sidebar__testimonial">
  119.                             <div class="c-project-sidebar__testimonial--header d-flex align-items-center">
  120.                                 <?php if ( isset( $project_mentor_image[0] ) && !empty( $project_mentor_image[0] ) ): ?>
  121.                                     <div class="c-project-sidebar__testimonial--profile">
  122.                                         <img src="<?php echo $project_mentor_image[0]; ?>" alt="" class="img-fluid rounded-circle">
  123.                                     </div>
  124.                                 <?php endif ?>
  125.                                 <div class="c-project-sidebar__testimonial--content">
  126.                                     <div class="c-project-sidebar__testimonial--content__position">your mentor</div>
  127.                                     <!-- <div class="c-project-sidebar__testimonial--content__position"><?php //echo $project_mentor_position ?></div> -->
  128.                                     <div class="c-project-sidebar__testimonial--content__name"><?php echo $project_mentor_name ?></div>
  129.                                 </div>
  130.                             </div>
  131.                         </div>
  132.                     </div>
  133.                     <div class="c-project-sidebar__content c-content-same-height">
  134.                         <div class="c-project-sidebar__testimonial">
  135.                             <div class="row align-items-center">
  136.                                 <div class="col-12">
  137.                                     <div class="c-project-sidebar__testimonial--text">
  138.                                         <?php //echo $pb_gray_box_content;
  139.                                         echo $project_mentor_detail; ?>
  140.                                     </div>
  141.                                 </div>
  142.                             </div>
  143.                         </div>
  144.                         <div class="c-sidebar-experience">
  145.                             <div class="c-sidebar-experience__title">
  146.                                 <?php echo $project_mentor_experience_title ?>
  147.                             </div>
  148.                             <?php if (!empty($project_mentor_experience)): ?>
  149.                                 <ul class="c-sidebar-experience__list">
  150.                                     <?php foreach ($project_mentor_experience as $line): ?>
  151.                                         <li><?php echo $line['experience_list'] ?></li>
  152.                                     <?php endforeach ?>
  153.                                 </ul>
  154.                             <?php endif ?>
  155.                             <?php if (trim($project_mentor_linkedin_profile) != ''): ?>
  156.                                 <div class="c-sidebar-experience__cta">
  157.                                     <div class="btn__holder">
  158.                                         <a href="<?php echo $project_mentor_linkedin_profile; ?>" class="">See <?php echo $pb_gray_box_person; ?> LinkedIn Profile
  159.                                         <svg width="19px" height="8px" viewBox="0 0 19 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  160.                                             <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
  161.                                                 <g id="text-link" transform="translate(-165.000000, -7.000000)" fill="#C5C9C9">
  162.                                                     <g transform="translate(17.000000, 3.000000)" id="arrow">
  163.                                                         <path d="M163.146218,8.29470499 L148.5,8.29470499 C148.223858,8.29470499 148,8.07084737 148,7.79470499 C148,7.51856262 148.223858,7.29470499 148.5,7.29470499 L163.146218,7.29470499 L163.146218,4.26387193 C163.146218,3.98517072 163.299412,3.91243328 163.504168,4.11718937 L166.821817,7.43483776 C167.019507,7.63252843 167.026573,7.94598292 166.821817,8.150739 L163.504168,11.4683874 C163.306478,11.6660781 163.146218,11.5936054 163.146218,11.3217048 L163.146218,8.29470499 Z"></path>
  164.                                                     </g>
  165.                                                 </g>
  166.                                             </g>
  167.                                         </svg></a>
  168.                                     </div>
  169.                                 </div>
  170.                             <?php endif ?>
  171.                         </div>
  172.                     </div>
  173.                 </div>
  174.             </div>
  175.         </div>
  176.         <?php
  177. $bonus_header = get_field('bonus_header');
  178. $bonus_line_1 = get_field('bonus_line_1');
  179. $bonus_text   = get_field('bonus_text');
  180. ?>
  181.         <?php if (trim($bonus_header . $bonus_line_1 . $bonus_text) != ''): ?>
  182.             <div id="bonus-wrapper">
  183.                 <div id="bonus-banner">
  184.                     <h2><?php echo $bonus_header ?></h2>
  185.                     <p class="first-line">
  186.                         <?php echo $bonus_line_1 ?>
  187.                     </p>
  188.                     <p>
  189.                         <?php echo $bonus_text ?>
  190.                     </p>
  191.                 </div>
  192.             </div>
  193.         <?php endif ?>
  194.  
  195.         <div class="row justify-content-center">
  196.             <div class="col">
  197.                 <div class="the-project-brief__below">
  198.                     <?php echo $pb_gray_box_below_content; ?>
  199.                 </div>
  200.             </div>
  201.         </div>
  202.     </div>
  203. </div>
  204.  
  205.  
  206.  
  207. <?php
  208. $bb_title          = get_field('bb_title');
  209. $bb_text           = get_field('bb_text');
  210. $bb_left_picture   = get_field('bb_left_picture');
  211. $bb_left_picture_2 = get_field('bb_left_picture_2');
  212. $bb_right_text     = get_field('bb_right_text');
  213. ?>
  214. <!--
  215. <?php if (!empty($bb_title)): ?>
  216.     <div class="c-foundation background__blue-10 spacing__70_tb">
  217.         <div class="container">
  218.             <div class="row">
  219.                 <div class="col">
  220.                     <h3 class="text-center h3-white margin__55_b"><?php echo $bb_title ?></h3>
  221.                 </div>
  222.             </div>
  223.             <div class="row">
  224.                 <div class="col-12 col-md-3">
  225.  
  226.                     <div class="c-foundation__logos">
  227.                         <div class="row">
  228.                             <div class="col-12">
  229.                                 <?php if ($bb_left_picture): ?>
  230.                                     <img src="<?php echo $bb_left_picture['sizes']['project_2'] ?>" alt="" class="img-fluid">
  231.                                 <?php endif ?>
  232.                                 <?php if ($bb_left_picture_2): ?>
  233.                                     <img src="<?php echo $bb_left_picture_2['sizes']['project_2'] ?>" alt="" class="img-fluid">
  234.                                 <?php endif ?>
  235.                             </div>
  236.                         </div>
  237.                     </div>
  238.  
  239.                 </div>
  240.                 <div class="col-12 col-md-5">
  241.                     <?php echo $bb_text ?>
  242.                 </div>
  243.                 <div class="col-12 col-md-4">
  244.                     <div class="c-foundation__ad--wrapper">
  245.                         <div class="c-foundation__ad">
  246.                             <?php echo $bb_right_text ?>
  247.                         </div>
  248.                     </div>
  249.                 </div>
  250.             </div>
  251.         </div>
  252.     </div>
  253. <?php endif; ?> -->
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260. <!-- section skills start here  -->
  261. <?php get_template_part( 'template-parts/common/content', 'skills' ); ?>
  262. <!-- section skills end here  -->
  263.  
  264. <!-- Case Studies Section start here -->
  265. <?php get_template_part( 'template-parts/common/content', 'case_studies' ); ?>
  266. <!-- Case Studies Section end here -->
  267.  
  268.  
  269. <!-- section employablity scorecard start here  -->
  270. <?php get_template_part( 'template-parts/common/content', 'scorecard' ); ?>
  271. <!-- section employablity scorecard end here  -->
  272.  
  273. <!-- section testimonial start here  -->
  274. <?php get_template_part( 'template-parts/common/content', 'testimonial-video' ); ?>
  275. <!-- section testimonial end here  -->
  276. <?php
  277. // Form Section
  278.     $package_settings = get_field( 'package_settings', get_the_ID() );
  279.     $close_package = isset( $package_settings['close_package'] ) && !empty( $package_settings['close_package'] ) ? $package_settings['close_package'] : false;
  280.  
  281.     if ( $close_package != 1 ) {
  282.         get_template_part('template-parts/single-package/content', 'form');
  283.     }
  284.  
  285.  get_template_part('templates/page', 'footer'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement