MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/webofai.imenso.co/wp-content/themes/webofai_theme-old/category.php
<?php
/**
 * A Simple Category Template
 */
$category = get_queried_object();
get_header(); ?>
<section class="wp_collection_block" data-section-class="wp_collection_block">
  <div class="container">
    <h2 class="wp-collection-title headline-2"><?= single_cat_title(); ?></h2>
    <?php if (category_description()) { ?>
      <div
        class="wp-collection-description paragraph"><?= category_description() ?></div>
    <?php } ?>

    <?php
    $paged = (get_query_var('page_val') ? get_query_var('page_val') : 1);
    $args = array('paged' => $paged, 'category_name' => $category->slug, 'posts_per_page' => 6, 'order' => 'DESC', 'orderby' => 'date', 'post_status' => 'publish');
    $the_query = new WP_Query($args);
    $have_posts = $the_query->have_posts();
    ?>
    <?php if ($have_posts) {
      ?>
      <div class="wp-collection-cards grid-cards" posts-container>
        <?php while ($the_query->have_posts()) {
          $the_query->the_post();
          get_template_part("partials/collection-card", '', array('post_id' => get_the_id()));
        }
        /* Restore original Post Data */
        wp_reset_postdata(); ?>
      </div>
      <div
        class="no-posts headline-2 <?= $the_query->have_posts() ? ' ' : 'active' ?>">
        <?= __('No posts Here :(', 'webofai_theme') ?></div>
      <div
        class="load-more-wrapper <?= $the_query->max_num_pages <= 1 ? 'hidden' : '' ?>"
        data-args='<?= json_encode($args) ?>'
        data-template="partials/post-card">
        <button aria-label="Load More Posts "
                class="cta-button  load-more-btn"><?= __('Load More', 'webofai_theme') ?>
        </button>
        <div class="loader">
          <div class="loader-ball"></div>
          <div class="loader-ball"></div>
          <div class="loader-ball"></div>
        </div>
      </div>
      <!--      --><?php //\Theme\Helpers::get_paginate_links($the_query, $paged); ?>
    <?php } else {

      ?>
      <h3 class="wp-collection-no-posts headline-2 text-center"><?= __('No Posts For This Category', 'webofai_theme') ?></h3>

      <?php
    } ?>
  </div>
</section>
<?php get_footer(); ?>