Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.37 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">
  79.                         <div class="">
  80.                         <img src="<?php echo $project_company_small_image;?>">
  81.                         <?php echo $project_company_small_text;?>
  82.                         <br/>
  83.                         <br/>
  84.                         <?php echo $project_company_introduction_text;?>
  85.                         <br/>
  86.                         <br/>
  87.                         <?php echo $project_company_brief_heading;?>
  88.                         <?php echo $project_company_brief;?>
  89.                         <br/>
  90.                         <?php echo $project_company_list_title;?>
  91.                         <?php if( $project_company_list ){
  92.                             foreach(  $project_company_list as  $list ){
  93.                                 echo $list['text'];
  94.                             }
  95.                         } ?>
  96.                     <br/>
  97.                         <?php if( isset( $project_company_website_link['title'] ) && !empty( $project_company_website_link['title'] ) ){ ?>
  98.                            <a href="<?php echo $project_company_website_link["link"];?>" target="<?php echo $project_company_website_link["link"];?>">
  99.                                 <?php echo $project_company_website_link['title'];?>
  100.                             </a>
  101.                         <?php } ?>
  102.  
  103.                         </div>
  104.                         <?php //echo $pb_content ?>
  105.                     </div>
  106.                 </div>
  107.             </div>
  108.             <div class="col-12 col-md-6">
  109.                 <div class="c-project-sidebar">
  110.                     <div class="c-project-sidebar__header">
  111.                         <div class="c-project-sidebar__testimonial">
  112.                             <div class="c-project-sidebar__testimonial--header d-flex align-items-center">
  113.                                 <?php if ( isset( $project_mentor_image[0] ) && !empty( $project_mentor_image[0] ) ): ?>
  114.                                     <div class="c-project-sidebar__testimonial--profile">
  115.                                         <img src="<?php echo $project_mentor_image[0]; ?>" alt="" class="img-fluid rounded-circle">
  116.                                     </div>
  117.                                 <?php endif ?>
  118.                                 <div class="c-project-sidebar__testimonial--content">
  119.                                     <div class="c-project-sidebar__testimonial--content__position">your mentor</div>
  120.                                     <!-- <div class="c-project-sidebar__testimonial--content__position"><?php //echo $project_mentor_position ?></div> -->
  121.                                     <div class="c-project-sidebar__testimonial--content__name"><?php echo $project_mentor_name ?></div>
  122.                                 </div>
  123.                             </div>
  124.                         </div>
  125.                     </div>
  126.                     <div class="c-project-sidebar__content">
  127.                         <div class="c-project-sidebar__testimonial">
  128.                             <div class="row align-items-center">
  129.                                 <div class="col-12">
  130.                                     <div class="c-project-sidebar__testimonial--text">
  131.                                         <?php //echo $pb_gray_box_content;
  132.                                         echo $project_mentor_detail; ?>
  133.                                     </div>
  134.                                 </div>
  135.                             </div>
  136.                         </div>
  137.                         <div class="c-sidebar-experience">
  138.                             <div class="c-sidebar-experience__title">
  139.                                 <?php echo $project_mentor_experience_title ?>
  140.                             </div>
  141.                             <?php if (!empty($project_mentor_experience)): ?>
  142.                                 <ul class="c-sidebar-experience__list">
  143.                                     <?php foreach ($project_mentor_experience as $line): ?>
  144.                                         <li><?php echo $line['experience_list'] ?></li>
  145.                                     <?php endforeach ?>
  146.                                 </ul>
  147.                             <?php endif ?>
  148.                             <?php if (trim($project_mentor_linkedin_profile) != ''): ?>
  149.                                 <div class="c-sidebar-experience__cta">
  150.                                     <a href="<?php echo $project_mentor_linkedin_profile; ?>" class="">See <?php echo $pb_gray_box_person; ?> LinkedIn Profile
  151.                                     <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">
  152.                                         <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
  153.                                             <g id="text-link" transform="translate(-165.000000, -7.000000)" fill="#C5C9C9">
  154.                                                 <g transform="translate(17.000000, 3.000000)" id="arrow">
  155.                                                     <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>
  156.                                                 </g>
  157.                                             </g>
  158.                                         </g>
  159.                                     </svg></a>
  160.                                 </div>
  161.                             <?php endif ?>
  162.                         </div>
  163.                     </div>
  164.                 </div>
  165.             </div>
  166.         </div>
  167.         <?php
  168. $bonus_header = get_field('bonus_header');
  169. $bonus_line_1 = get_field('bonus_line_1');
  170. $bonus_text   = get_field('bonus_text');
  171. ?>
  172.         <?php if (trim($bonus_header . $bonus_line_1 . $bonus_text) != ''): ?>
  173.             <div id="bonus-wrapper">
  174.                 <div id="bonus-banner">
  175.                     <h2><?php echo $bonus_header ?></h2>
  176.                     <p class="first-line">
  177.                         <?php echo $bonus_line_1 ?>
  178.                     </p>
  179.                     <p>
  180.                         <?php echo $bonus_text ?>
  181.                     </p>
  182.                 </div>
  183.             </div>
  184.         <?php endif ?>
  185.  
  186.         <div class="row justify-content-center">
  187.             <div class="col">
  188.                 <div class="the-project-brief__below">
  189.                     <?php echo $pb_gray_box_below_content; ?>
  190.                 </div>
  191.             </div>
  192.         </div>
  193.     </div>
  194. </div>
  195.  
  196.  
  197.  
  198. <?php
  199. $bb_title          = get_field('bb_title');
  200. $bb_text           = get_field('bb_text');
  201. $bb_left_picture   = get_field('bb_left_picture');
  202. $bb_left_picture_2 = get_field('bb_left_picture_2');
  203. $bb_right_text     = get_field('bb_right_text');
  204. ?>
  205. <!--
  206. <?php if (!empty($bb_title)): ?>
  207.     <div class="c-foundation background__blue-10 spacing__70_tb">
  208.         <div class="container">
  209.             <div class="row">
  210.                 <div class="col">
  211.                     <h3 class="text-center h3-white margin__55_b"><?php echo $bb_title ?></h3>
  212.                 </div>
  213.             </div>
  214.             <div class="row">
  215.                 <div class="col-12 col-md-3">
  216.  
  217.                     <div class="c-foundation__logos">
  218.                         <div class="row">
  219.                             <div class="col-12">
  220.                                 <?php if ($bb_left_picture): ?>
  221.                                     <img src="<?php echo $bb_left_picture['sizes']['project_2'] ?>" alt="" class="img-fluid">
  222.                                 <?php endif ?>
  223.                                 <?php if ($bb_left_picture_2): ?>
  224.                                     <img src="<?php echo $bb_left_picture_2['sizes']['project_2'] ?>" alt="" class="img-fluid">
  225.                                 <?php endif ?>
  226.                             </div>
  227.                         </div>
  228.                     </div>
  229.  
  230.                 </div>
  231.                 <div class="col-12 col-md-5">
  232.                     <?php echo $bb_text ?>
  233.                 </div>
  234.                 <div class="col-12 col-md-4">
  235.                     <div class="c-foundation__ad--wrapper">
  236.                         <div class="c-foundation__ad">
  237.                             <?php echo $bb_right_text ?>
  238.                         </div>
  239.                     </div>
  240.                 </div>
  241.             </div>
  242.         </div>
  243.     </div>
  244. <?php endif; ?> -->
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251. <!-- section skills start here  -->
  252. <?php get_template_part( 'template-parts/common/content', 'skills' ); ?>
  253. <!-- section skills end here  -->
  254.  
  255. <!-- Case Studies Section start here -->
  256. <?php get_template_part( 'template-parts/common/content', 'case_studies' ); ?>
  257. <!-- Case Studies Section end here -->
  258.  
  259.  
  260. <!-- section employablity scorecard start here  -->
  261. <?php get_template_part( 'template-parts/common/content', 'scorecard' ); ?>
  262. <!-- section employablity scorecard end here  -->
  263.  
  264. <!-- section testimonial start here  -->
  265. <?php get_template_part( 'template-parts/common/content', 'testimonial-video' ); ?>
  266. <!-- section testimonial end here  -->
  267. <?php
  268. // Form Section
  269.     $package_settings = get_field( 'package_settings', get_the_ID() );
  270.     $close_package = isset( $package_settings['close_package'] ) && !empty( $package_settings['close_package'] ) ? $package_settings['close_package'] : false;
  271.  
  272.     if ( $close_package != 1 ) {
  273.         get_template_part('template-parts/single-package/content', 'form');
  274.     }
  275.  
  276.  get_template_part('templates/page', 'footer'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement