|
@@ -158,8 +158,43 @@ get_header(); ?>
|
|
$query = new WP_Query($args);
|
|
$query = new WP_Query($args);
|
|
|
|
|
|
if ($query->have_posts()) :
|
|
if ($query->have_posts()) :
|
|
- while ($query->have_posts()) :
|
|
|
|
- $query->the_post(); ?>
|
|
|
|
|
|
+ while ($query->have_posts()) : $query->the_post();
|
|
|
|
+
|
|
|
|
+ $login_id_e = "";
|
|
|
|
+ $auth_token = get_field('auth_token', 'option');
|
|
|
|
+ $client_id = get_field('client_id', 'option');
|
|
|
|
+ $employee_info_api = get_field('employee_info_api', 'option');
|
|
|
|
+
|
|
|
|
+ if (function_exists('get_field')) {
|
|
|
|
+ $pid_content = get_post();
|
|
|
|
+ if (has_blocks($pid_content)) {
|
|
|
|
+ $blocks = parse_blocks($pid_content->post_content);
|
|
|
|
+ foreach ($blocks as $block) {
|
|
|
|
+ if ($block["blockName"] == "acf/faculty-member") {
|
|
|
|
+ // $FullName = $block['login_id_e'];
|
|
|
|
+ $login_id_e = $block["attrs"]["data"]["login_id"];
|
|
|
|
+ // $Designation = $block["attrs"]["data"];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ $response_employeeInfo = wp_remote_post(
|
|
|
|
+ $employee_info_api,
|
|
|
|
+ array(
|
|
|
|
+ 'body' => array(
|
|
|
|
+ 'user_login_id' => $client_id,
|
|
|
|
+ 'login_id' => $login_id_e,
|
|
|
|
+ 'auth_token' => $auth_token
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ $employeeInfo = json_decode(wp_remote_retrieve_body($response_employeeInfo), true);
|
|
|
|
+ $Title = $employeeInfo[0]['Title'];
|
|
|
|
+ $FullName = $Title . ' ' . $employeeInfo[0]['FullName'];
|
|
|
|
+ $Designation = $employeeInfo[0]['Designation'] . ', ' . $employeeInfo[0]['Office'];
|
|
|
|
+ ?>
|
|
|
|
+
|
|
<div class="car-item">
|
|
<div class="car-item">
|
|
|
|
|
|
<div class="car-item-holder">
|
|
<div class="car-item-holder">
|
|
@@ -169,8 +204,12 @@ get_header(); ?>
|
|
<a class="faculty-name" href="<?php echo get_the_permalink(); ?>">
|
|
<a class="faculty-name" href="<?php echo get_the_permalink(); ?>">
|
|
<div class="faculty-details">
|
|
<div class="faculty-details">
|
|
|
|
|
|
- <h2><?php echo get_the_title(); ?><span class="degree">, Ph.D.</span></h2>
|
|
|
|
- <h3><span class="degree">Department of Computer Science and Engineering</span></h3>
|
|
|
|
|
|
+ <h2><?php echo $FullName; ?><span class="degree">
|
|
|
|
+ <?php if ($Title == "Dr.") {
|
|
|
|
+ echo ', PhD';
|
|
|
|
+ } ?>
|
|
|
|
+ </span></h2>
|
|
|
|
+ <h3><span class="degree"><?php echo $Designation; ?></span></h3>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</a>
|