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: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/webofai.imenso.co/wp-content/themes/webofai_theme/archive.php
<?php
get_header();

$post_type = get_post_type();
var_dump($post_type);
$args = array(
  'post_type' => $post_type,
  'posts_per_page' => 30,
  'orderby' => 'date',
  'order' => 'DESC',
  'ignore_sticky_posts' => 1,
  'post_status' => 'publish',
);
$posts_query = new WP_Query($args);
?>
  <section class="wp_collection_block"
           data-section-class="wp_collection_block">
    <div class="container">
      <h2
        class="wp-collection-title headline-1"><?= get_the_archive_title(); ?></h2>
      <?php if (get_the_archive_description()) { ?>
        <div
          class="wp-collection-description paragraph"><?= get_the_archive_description() ?></div>
      <?php } ?>
      <div class="posts-wrapper">

        <?php
        if ($posts_query->have_posts()) {
          while ($posts_query->have_posts()) {
            $posts_query->the_post();
            get_template_part("partials/tool-card", '', array('post_id' => get_the_ID()));
          }
        } else {
          ?>
          <h3 class="headline-4"><?= __('No Posts To Show','webofai_theme')?></h3>
        <?php }
        wp_reset_postdata(); ?>
      </div>
    </div>
  </section>
<?php get_footer();