Browse Source

Faculty profile updated for all pages

Md Mozahidur Rahman 1 year ago
parent
commit
addabe5bae
3 changed files with 81 additions and 110 deletions
  1. 9 9
      archive-faculty.php
  2. 37 4
      css/theme-styles.css
  3. 35 97
      page-template/page-home.php

+ 9 - 9
archive-faculty.php

@@ -37,20 +37,20 @@ get_header();
 							<div class="stub-img-holder">
 							<div class="stub-img-holder">
 								<img class="stub-img" src="<?php the_field('profile_photo'); ?>" alt="">
 								<img class="stub-img" src="<?php the_field('profile_photo'); ?>" alt="">
 							</div>
 							</div>
+							<a class="faculty-link" href="<?php echo get_the_permalink(); ?>">
+								<div class="archive-faculty-details">
 
 
-							<div class="archive-faculty-details">
-								<a class="faculty-name" href="<?php echo get_the_permalink(); ?>">
 									<h3><?php echo get_the_title(); ?></h3>
 									<h3><?php echo get_the_title(); ?></h3>
-								</a>
 
 
-								<span class="faculty-designation">
-									Department of Computer Science and Engineering
-									<?php //the_field('designation');
-									?>
-								</span>
+									<span class="faculty-designation">
+										Department of Computer Science and Engineering
+										<?php //the_field('designation');
+										?>
+									</span>
 
 
-							</div>
+								</div>
 
 
+							</a>
 						</div>
 						</div>
 
 
 
 

+ 37 - 4
css/theme-styles.css

@@ -1669,13 +1669,26 @@ body.archive aside#secondary{
     margin: 30px 0 0 10px !important;
     margin: 30px 0 0 10px !important;
 }
 }
 
 
-
-.faculty-stub{
+#all-faculties .faculty-stub {
   display: flex;
   display: flex;
+  padding: 0 !important;
+}
+.archive #all-faculties .stub-img-holder{
+  border-radius: 0!important;
+}
+
+#all-faculties  .faculty-link {
+    width: 65%;
+    padding: 0px 10px;
+}
+#all-faculties .faculty-link:hover {
+  background-color: rgba(241, 136, 0, 0.15);
+  text-decoration: none;
 }
 }
 
 
-.archive-faculty-details {
-    width: 80%;
+#all-faculties .archive-faculty-details {
+    height: unset!important;
+    padding: 0!important;
 }
 }
 
 
 #all-events h3 {
 #all-events h3 {
@@ -1709,3 +1722,23 @@ body.archive aside#secondary{
   flex-direction: column;
   flex-direction: column;
   justify-content: center;
   justify-content: center;
 }
 }
+
+/* home page */
+.faculty-details:hover {
+    background-color: rgba(241, 136, 0, 0.15);
+    border-bottom-left-radius: 10px;
+    border-bottom-right-radius: 10px;
+}
+#faculty-carousel .car-img-holder {
+    margin-bottom: 0!important;
+}
+#faculty-carousel .faculty-details {
+    padding-top: 20px!important;
+}
+
+#faculty-carousel .faculty-details h3 {
+    white-space: pre-wrap!important;
+}
+#faculty-carousel a.faculty-name {
+    text-decoration: none;
+}

+ 35 - 97
page-template/page-home.php

@@ -65,11 +65,11 @@ get_header(); ?>
                         <h4>Welcome to </h4>
                         <h4>Welcome to </h4>
                         <h1>Department of <br>
                         <h1>Department of <br>
                             Computer Science &amp; Engineering</h1>
                             Computer Science &amp; Engineering</h1>
-                        <h3>
-                            United International University
+                        United International University
                         </h3>
                         </h3>
                     </div>
                     </div>
                 </div>
                 </div>
+
             </li>
             </li>
 
 
         </ul>
         </ul>
@@ -152,7 +152,7 @@ get_header(); ?>
                 <p>
                 <p>
                     The Department of Computer Science and Engineering faculty members are an impressive group, bearing the academic tradition of higher excellence. World renowned, they are engaged in ground-breaking research. Further, they are so attuned to what’s happening in business that they are shaping its future.
                     The Department of Computer Science and Engineering faculty members are an impressive group, bearing the academic tradition of higher excellence. World renowned, they are engaged in ground-breaking research. Further, they are so attuned to what’s happening in business that they are shaping its future.
                 </p>
                 </p>
-                <a href="https://uiu.revinr.work/cse/faculty/">
+                <a href="/faculty/">
                     <button class="primary-c">
                     <button class="primary-c">
                         View complete faculty list
                         View complete faculty list
                     </button>
                     </button>
@@ -175,108 +175,46 @@ get_header(); ?>
 
 
             <div class="profile-carousel">
             <div class="profile-carousel">
 
 
-                <div class="car-item">
-                    <div class="car-item-holder">
-                        <div class="car-img-holder">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/saim.jpg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Islam, Salekul<span class="degree">, Ph.D.</span></h2>
-                            <h3><span class="degree">Professor & Head of the Dept.</span></h3>
-
-
-                        </div>
-
-                    </div>
-                </div>
-
-                <div class="car-item">
-                    <div class="car-item-holder">
-                        <div class="car-img-holder">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/mamun.jpg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Mamun, Khondaker Abdullah Al<span class="degree">, Ph.D.</span></h2>
-                            <h3><span class="degree">Professor & Director - AIMS Lab</span></h3>
-                        </div>
-
-                    </div>
-                </div>
-
-                <div class="car-item">
-                    <div class="car-item-holder">
-                        <div class="car-img-holder">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/swakkhar.jpg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Shatabda, Swakkhar<span class="degree">, Ph.D</span></h2>
-                            <h3><span class="degree">Professor & Director - IQAC</span></h3>
-
-
-                        </div>
-
-                    </div>
-                </div>
-
-                <div class="car-item">
-                    <div class="car-item-holder">
-                        <div class="car-img-holder">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/ShahriarRahman.jpg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Rahman, Mohammad Shahriar<span class="degree">, Ph.D</span></h2>
-                            <h3><span class="degree">Professor & Director - CITS</span></h3>
-
-
-                        </div>
-
-                    </div>
-                </div>
-
-                <div class="car-item">
-
-                    <div class="car-item-holder">
-                        <div class="car-img-holder">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/mofizur.jpg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Rahman, Chowdhury Mofizur<span class="degree">, Ph.D</span></h2>
-                            <h3><span class="degree">Professor & Advisor to Board of Trustees</span></h3>
-
-
-                        </div>
-
-                    </div>
-                </div>
-
-
-                <div class="car-item">
+                <?php
+                $args = array(
+                    'post_type'      => 'faculty',
+                    'posts_per_page' => 10,
+                    //'post__not_in' => array(get_the_ID()),
+                    'orderby'        => 'date',
+                    'order'          => 'DESC',
+                );
+
+                $query = new WP_Query($args);
+
+                if ($query->have_posts()) :
+                    while ($query->have_posts()) :
+                        $query->the_post(); ?>
+                        <div class="car-item">
+
+                            <div class="car-item-holder">
+                                <div class="car-img-holder">
+                                    <img src="<?php the_field('profile_photo') ?>" alt="">
+                                </div>
+                                <a class="faculty-name" href="<?php echo get_the_permalink(); ?>">
+                                    <div class="faculty-details">
 
 
-                    <div class="car-item-holder">
-                        <div class="car-img-holder">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/nurul-huda.png" alt="">
-                        </div>
+                                        <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>
 
 
-                        <div class="faculty-details">
-                            <h2>Huda, Mohammad Nurul<span class="degree">, Ph.D</span></h2>
-                            <h3><span class="degree">Professor & Director - MSCSE</span></h3>
+                                    </div>
+                                </a>
+                            </div>
 
 
                         </div>
                         </div>
-
-                    </div>
-                </div>
-
+                <?php
+                    endwhile;
+                else :
+                    echo '<div class="no-post-found">No faculty profile has found! </div>';
+                endif; ?>
 
 
             </div>
             </div>
-
         </section>
         </section>
 
 
-
         <section id="Success-section" class="container-fluid white-bg">
         <section id="Success-section" class="container-fluid white-bg">
             <div class="container">
             <div class="container">
                 <h1>Success Stories</h1>
                 <h1>Success Stories</h1>