Browse Source

Block update

Rousnay 1 year ago
parent
commit
31e563682b
1 changed files with 3 additions and 4 deletions
  1. 3 4
      template-parts/blocks/faculty-member/block-faculty-member.php

+ 3 - 4
template-parts/blocks/faculty-member/block-faculty-member.php

@@ -1,5 +1,5 @@
 <?php
-
+$id = 'testimonial-' . $block['id'];
 $login_id = get_field('login_id');
 $url = 'http://103.109.52.3/webapi/api/EmployeeInfo';
 $response = wp_remote_post(
@@ -10,7 +10,6 @@ $response = wp_remote_post(
             'login_id' => $login_id,
             'auth_token' => 'api_user20230419045143'
         )
-
     )
 );
 
@@ -25,12 +24,12 @@ echo '<div class="portfolio-item">';
 //     echo wp_get_attachment_image($logo['ID'], 'thumbnail', null, array('class' => 'portfolio-logo alignleft'));
 // }
 if (!empty($login_id)) {
-    echo '<h3 class="portfolio-title">Faculty Member Information</h3>';
+    echo '<h3 class="portfolio-title">Faculty Member Information (Read only)</h3>';
     echo '<div class="portfolio-description"> <ul>';
     foreach ($data[0]  as $key => $value) {
         echo "<li> <strong>" . $key . " </strong>: " . $value . "</li>\n";
     }
-    echo '</ul></div>';
+    echo '</ul><p>' . $id . '</p></div>';
 } else {
     echo 'Please insert Login ID of the faculty member</ul></div>';
 }