HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/acharya-rajnikant-backup/wp-content/themes/aacharyarajnikant/blog.php
<?php

/**
 * Template Name: Blog Page
 */
get_header(); ?>

<!-- ================> Blog section start here <================== -->
<div class="blog blog-style2 padding--top padding--bottom bg-light">
    <div class="container">
        <div class="section__wrapper">
            <div class="row g-4">
                <div class="col-lg-8 col-12">
                    <div class="row g-4">
                        <?php
                        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                        $args = array(
                            'post_type'      => 'post',
                            'posts_per_page' => 6,
                            'paged'          => $paged,
                            'post_status'    => 'publish',
                        );
                        $blog_query = new WP_Query($args);

                        if ($blog_query->have_posts()) :
                            while ($blog_query->have_posts()) : $blog_query->the_post();
                        ?>
                                <div class="col-md-6 col-12">
                                    <div class="blog__item">
                                        <div class="blog__inner">
                                            <div class="blog__thumb">
                                                <a href="<?php the_permalink(); ?>">
                                                    <?php if (has_post_thumbnail()) : ?>
                                                        <?php the_post_thumbnail('full'); ?>
                                                    <?php else : ?>
                                                        <img src="<?php echo get_template_directory_uri(); ?>/assets/images/blog/07.jpg" alt="blog thumb">
                                                    <?php endif; ?>
                                                </a>
                                            </div>
                                            <div class="blog__content">
                                                <a href="<?php the_permalink(); ?>">
                                                    <h5><?php the_title(); ?></h5>
                                                </a>
                                                <ul class="blog__content-metapost">
                                                    <li><i class="far fa-calendar"></i> <?php echo get_the_date('d M Y'); ?></li>
                                                    <li><i class="fas fa-user"></i> <?php the_author(); ?></li>
                                                    <li><i class="fas fa-tag"></i> <?php the_category(', '); ?></li>
                                                </ul>
                                                <?php the_excerpt(); ?>
                                                <a href="<?php the_permalink(); ?>" class="default-btn move-right"><span>Read More</span></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php
                            endwhile;
                            ?>
                    </div>
                    <?php aacharyarajnikant_pagination($blog_query); ?>
                <?php
                            wp_reset_postdata();
                        else :
                ?>
                    <p>No blog posts found.</p>
                <?php endif; ?>
                </div>
                <div class="col-lg-4 col-12">
                    <?php get_sidebar(); ?>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- ================> Blog section end here <================== -->


<?php get_footer(); ?>