Ver Fonte

making home page dynamic

Md Mozahidur Rahman há 1 ano atrás
pai
commit
36a320d998
1 ficheiros alterados com 64 adições e 162 exclusões
  1. 64 162
      page-template/page-home.php

+ 64 - 162
page-template/page-home.php

@@ -28,7 +28,6 @@ get_header(); ?>
             <li class="slide" data-active>
                 <div class="slider-single-div">
                     <img src="<?php echo (get_template_directory_uri()) ?>/img/campus_01.jpg" alt="">
-
                     <div class="banner-overlay">
                         <h4>Welcome to </h4>
                         <h1>United<br> International<br> University</h1>
@@ -44,7 +43,6 @@ get_header(); ?>
             <li class="slide">
                 <div class="slider-single-div">
                     <img src="<?php echo (get_template_directory_uri()) ?>/img/Slider_Swan2.jpg" alt="">
-
                     <div class="banner-overlay">
                         <h4>Welcome to </h4>
                         <h1>United International University</h1>
@@ -60,7 +58,6 @@ get_header(); ?>
             <li class="slide">
                 <div class="slider-single-div">
                     <img src="<?php echo (get_template_directory_uri()) ?>/img/campus_02.jpg" alt="">
-
                     <div class="banner-overlay">
                         <h4>Welcome to </h4>
                         <h1>Department of <br>
@@ -69,11 +66,8 @@ get_header(); ?>
                         </h3>
                     </div>
                 </div>
-
             </li>
-
         </ul>
-
     </div>
 </section>
 
@@ -88,13 +82,8 @@ get_header(); ?>
                 <p>
                     The CSE Department of UIU has been involved in several projects in last five years including projects under Thrust/Emerging Areas, Modernization and Removal of Obsolescence, Industry-Institution Interaction.
                 </p>
-
-
                 <button class="primary-c">Learn more</button>
-
                 <div class="grid">
-
-
                     <div class="program">
                         <div class="img-cont-2">
                             <img src="<?php echo (get_template_directory_uri()) ?>/img/student_03.jpg" alt="">
@@ -104,10 +93,7 @@ get_header(); ?>
                             <p>
                                 <b>United International University (UIU)</b> has been running its M.Sc. in Computer Science and Engineering program since its inception and has attracted not only fresh undergraduates but also a handful number of ICT professionals from the industry.
                             </p>
-
                             <button class="primary-c"> View All Programs </button>
-
-
                         </div>
                     </div>
 
@@ -116,7 +102,6 @@ get_header(); ?>
                             <img src="<?php echo (get_template_directory_uri()) ?>/img/undergrad.jpg" alt="">
                         </div>
 
-
                         <div class="program-details">
                             <h2>Undergraduate Program</h2>
                             <p>
@@ -148,7 +133,6 @@ get_header(); ?>
                 <div id="faculty-img">
                     <img src="<?php echo (get_template_directory_uri()) ?>/img/faculty-grp.jpg" alt="">
                 </div>
-
                 <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.
                 </p>
@@ -166,7 +150,6 @@ get_header(); ?>
                 <button class="car-control primary-c" id="prev-car" onclick="scrollToPrev()">
                     >
                 </button>
-
                 <button class="car-control primary-c" id="next-car" onclick="scrollToNext()">
                     >
                 </button>
@@ -225,52 +208,41 @@ get_header(); ?>
 
             <div class="container">
 
-
                 <div id="us-imgs" class="grid student-stories">
 
-                    <div>
-                        <div class="img-cont">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/story_hasan_shaharear.jpg" alt="">
-                        </div>
-                        <div>
-                            <h2>Mohammad Hasan Shaharear</h2>
-                            <h5>Senior Database Engineer,Therap (BD) Ltd</h5>
-                            <p>
-                                It was a complete unknown territory for me when I admitted to BSCSE of UIU in 2003. In fact, I had never operate a computer before. Initially I was a bit exited as well as scared. Though I had tough time in the beginning, gradually I became familiar with logic of computing and programming languages. With the course of time, I had start enjoying different courses.
-                            </p>
-
-                            <a href="#">Learn more</a>
-                        </div>
-                    </div>
-
-                    <div>
-                        <div class="img-cont">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/story_foysal-ahmed.jpg" alt="">
-                        </div>
-                        <div>
-                            <h2>Foysal Ahamed</h2>
-                            <h5>Software Engineer, TigerIT Bangladesh Limited</h5>
-                            <p>
-                                I still remember the day I first stepped into the UIU campus. I really did not know what kind of career path I would choose. Two weeks into the SPL (Structured Programming Language) course, I discovered something that was driving me, something amazing happened and finally I found myself in a position where I knew what I was going to do. Dr.
-                            </p>
-                            <a href="#">Learn more</a>
-                        </div>
-                    </div>
-
-                    <div>
-                        <div class="img-cont">
-                            <img src="<?php echo (get_template_directory_uri()) ?>/img/story_kamrul_islam.jpg" alt="">
-                        </div>
-                        <div>
-                            <h2>Kamrul Islam Shahin</h2>
-                            <h5>Programmer, Big Web Technologies Limited</h5>
-                            <p>
-                                It’s still like a dream. The day I accomplished my goal by finishing my studies, all the struggles of the past years seemed nothing. My hard work showed its result finally. When I started my educational journey with United International University (UIU), the path seemed dark, confusing and quite uncertain.
-                            </p>
-                            <a href="#">Learn more </a>
-                        </div>
-                    </div>
+                    <?php
+                    $args = array(
+                        'post_type'      => 'success_story',
+                        'posts_per_page' => 3,
+                        //'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>
+                                <div class="img-cont">
+                                    <img src="<?php the_field('profile_image'); ?>" alt="">
+                                </div>
+                                <div>
+                                    <h2><?php echo get_the_title() ?></h2>
+                                    <h5><?php the_field('student_designation'); ?></h5>
+                                    <p>
+                                        <?php the_excerpt(); ?>
+                                    </p>
 
+                                    <a href="<?php echo get_the_permalink() ?>">Learn more</a>
+                                </div>
+                            </div>
+                    <?php
+                        endwhile;
+                    else :
+                        echo '<div class="no-post-found">No success story has found! </div>';
+                    endif; ?>
 
                 </div>
 
@@ -281,13 +253,12 @@ get_header(); ?>
                     </p>
                 </div>
 
-                <a href="https://uiu.revinr.work/cse/alumni/">
+                <a href="/alumni/">
                     <button class="primary-c">
                         View complete Alumni list
                     </button>
                 </a>
             </div>
-
         </section>
 
         <section class="container-fluid car" id="alumni-carousel">
@@ -303,121 +274,61 @@ get_header(); ?>
 
             <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/tazbir_ur_rahman.jpeg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Md. Tazbir Ur Rahman Bhuiyan</h2>
-                            <h3><span class="degree">Lead Engineer at Brain Station 23 Limited</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/saifur_rahman_sazib.jpeg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Saifur Rahman Sazib</h2>
-                            <h3><span class="degree">Lead Engineer at Objectstream Inc, USA</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/faisal_kabir.jpeg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Md Faisal Kabir</h2>
-                            <h3><span class="degree">PhD student at North Dakota State University (NDSU)</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/achia_nila.jpeg" alt="">
-                        </div>
-
-                        <div class="faculty-details">
-                            <h2>Achia Nila</h2>
-                            <h3><span class="degree"> Founder, Women In Digital - Empowerment through Technology</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/hussain_kmr.jpeg" alt="">
-                        </div>
+                <?php
+                $args = array(
+                    'post_type'      => 'alumni',
+                    'posts_per_page' => 10,
+                    //'post__not_in' => array(get_the_ID()),
+                    'orderby'        => 'date',
+                    'order'          => 'DESC',
+                );
 
-                        <div class="faculty-details">
-                            <h2>Hussain KMR Behestee</h2>
-                            <h3><span class="degree">Mobile Device Specialist, K.K. Innovative Solutions</span></h3>
+                $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">
+                                        <h2><?php echo get_the_title(); ?></h2>
+                                        <h3><span class="degree"><?php the_field('alumni_designation'); ?></span></h3>
+                                    </div>
+                                </a>
+                            </div>
                         </div>
 
-                    </div>
-                </div>
-
-
+                <?php
+                    endwhile;
+                else :
+                    echo '<div class="no-post-found">No alumni has found! </div>';
+                endif; ?>
 
             </div>
-
         </section>
 
         <section id="dept-notices" class="container-fluid mid-roll">
 
-
-
             <div class="bg-tint">
-
                 <div class="container">
-
                     <h1>Department Notices</h1>
-
                     <div class="notice-main">
-
                         <a href="#">
-
                             <div class="notice-container">
-
                                 <div class="event-date">
                                     <h3>Dec</h3>
                                     <h3>16</h3>
                                 </div>
-
                                 <div>
                                     <h6><span class="subtitle">8 Dec, 2022</span></h6>
                                     <h4>List of Candidates for Fall 2022 semester</h4>
                                     <p>Maecenas sed enim ut sem viverra aliquet. Neque laoreet suspendisse interdum consectetur.</p>
                                 </div>
-
                             </div>
                         </a>
 
@@ -448,7 +359,6 @@ get_header(); ?>
                                     <h3>Dec</h3>
                                     <h3>03</h3>
                                 </div>
-
                                 <div>
                                     <h6><span class="subtitle">8 Dec, 2022</span></h6>
                                     <h4>List of Candidates for Fall 2022 semester</h4>
@@ -462,7 +372,6 @@ get_header(); ?>
                         <a href="#">
 
                             <div class="notice-container">
-
                                 <div class="event-date">
                                     <h3>Nov</h3>
                                     <h3>25</h3>
@@ -473,7 +382,6 @@ get_header(); ?>
                                     <h4>List of Candidates for Fall 2022 semester</h4>
                                     <p>Maecenas sed enim ut sem viverra aliquet. Neque laoreet suspendisse interdum consectetur.</p>
                                 </div>
-
                             </div>
                         </a>
 
@@ -744,13 +652,7 @@ get_header(); ?>
 </main><!-- #main -->
 
 
-
-
-
-
-
-
-<!-- </div><!-- .row -->
-<!-- </div>.container --> -->
+<!-- </div> .row -->
+<!-- </div>.container -->
 
 <?php get_footer(); ?>