123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <?php
- /**
- * The template for displaying news archive page
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package UIU_CSE
- */
- get_header();
- ?>
- <main id="main" class="site-main" role="main">
- <div class="sections">
- <section id="all-faculties" class="container">
- <h2>List of Faculty Members of Department of CSE</h2>
- <!-- <hr> -->
- <div class="parent-grid">
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : 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="faculty-stub grid-sub-item">
- <div class="stub-img-holder">
- <img class="stub-img" src="<?php the_field('profile_photo'); ?>" alt="">
- </div>
- <a class="faculty-link" href="<?php echo get_the_permalink(); ?>">
- <div class="archive-faculty-details">
- <h3>
- <?php echo $FullName; ?><span class="degree"><?php if ($Title == "Dr.") {
- echo ', PhD';
- } ?></span>
- </h3>
- <span class="faculty-designation">
- <?php echo $Designation; ?>
- </span>
- </div>
- </a>
- </div>
- <?php endwhile; ?>
- <?php the_posts_navigation(); ?>
- <?php
- else :
- get_template_part('template-parts/content', 'none');
- endif;
- ?>
- </div>
- <div class="grid">
- </div>
- </section>
- </div>
- </main><!-- #main -->
- <style>
- @import url("https://fonts.googleapis.com/css2?family=DM+Serif+Text&display=swap");
- @import url("https://fonts.googleapis.com/css2?family=Open+Sans&display=swap");
- @import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css);
- header {
- height: 100px !important;
- }
- #all-faculties h2 {
- color: #000 !important;
- margin-top: 40px;
- margin-bottom: 20px;
- }
- #all-faculties .faculty-stub {
- width: 100%;
- padding: 5px;
- box-shadow: 2px 2px 10px 6px rgba(0, 0, 0, 0.137254902);
- margin: 30px auto;
- }
- #all-faculties .stub-img-holder {
- border-radius: 4px !important;
- height: 160px;
- overflow: hidden;
- }
- #all-faculties .stub-img-holder img {
- border-radius: 0px !important;
- height: 100%;
- width: 100%;
- -o-object-fit: cover;
- object-fit: cover;
- -o-object-position: center;
- object-position: center;
- }
- #all-faculties .archive-faculty-details {
- height: 100px;
- padding: 0px 10px;
- }
- #all-faculties .archive-faculty-details .faculty-degree {
- display: inline-block;
- color: rgba(89, 107, 161, 0.5647058824);
- font-weight: 800;
- font-size: 14px;
- }
- #all-faculties .archive-faculty-details .faculty-designation {
- display: block;
- color: rgba(0, 0, 0, 0.5647058824);
- font-weight: 800;
- font-size: 14px;
- }
- #all-faculties .archive-faculty-details h3 {
- font-size: 18px;
- line-height: 22px;
- font-family: "Open Sans", sans-serif;
- color: #2F4858 !important;
- margin: 10px auto;
- }
- /*# sourceMappingURL=archive-faculty.css.map */
- </style>
- <?php
- get_footer();
|