<div class="communities-boxes">
    <?php
    $delay = 0.1;
    while ($forums->have_posts()):
        $forums->the_post();
        ?>
        <div class="com-box wow fadeInRight" data-wow-delay="<?php echo esc_attr( $delay ); ?>s">
        <?php $delay += 0.1; ?>
            <?php if ( get_the_post_thumbnail( get_the_ID(), 'full' ) ) : ?>
                <div class="icon-container">
                    <?php the_post_thumbnail('full'); ?>
                </div>
            <?php endif; ?>
            <div class="com-box-content">
                <h3 class="title">
                    <a href="<?php the_permalink(); ?>"> <?php the_title() ?> </a>
                </h3>
                <p class="total-post"> <?php bbp_forum_topic_count(get_the_ID()); ?>
                    <?php esc_html_e(' Posts', 'forumax') ?>
                </p>
            </div>
            <!-- /.ama-com-box-content -->
        </div>
        <!-- /.ama-com-box -->
        <?php
    endwhile;
    wp_reset_postdata();
    ?>
</div>
<!-- /.communities-boxes -->

<div class="more-communities" data_id="<?php echo esc_attr($this->get_id()); ?>">

    <a href="#more-category" class="forumax-collapse-btn-wrap">
        <?php echo esc_html($settings['more_txt']); ?>

        <svg fill="#000000" width="16px" height="16px" viewBox="0 0 24 24" id="minus" data-name="Line Color"
            xmlns="http://www.w3.org/2000/svg" class="icon line-color icon_minus">
            <line id="primary" x1="19" y1="12" x2="5" y2="12"
                style="fill: none;  stroke-linecap: round; stroke-linejoin: round; stroke-width: 2;"></line>
        </svg>

        <svg fill="#000000" width="16px" height="16px" viewBox="0 0 24 24" id="plus" data-name="Line Color"
            xmlns="http://www.w3.org/2000/svg" class="icon line-color icon_plus">
            <path id="secondary" d="M5,12H19M12,5V19"
                style="fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2;"></path>
        </svg>
    </a>

    <div class="forumax-collapse-wrap" id="more-category" data_id="<?php echo esc_attr($this->get_id()); ?>">
        <div class="communities-boxes">
            <?php
            $forums2 = new WP_Query(array(
                'post_type' => 'forum',
                'posts_per_page' => !empty($settings['ppp2']) ? $settings['ppp2'] : 10,
                'offset' => !empty($settings['ppp']) ? $settings['ppp'] : 5,
                'order' => $settings['order'],
            ));
            while ($forums2->have_posts()):
                $forums2->the_post();
                ?>
                <div class="com-box">
                    <?php if ( get_the_post_thumbnail( get_the_ID(), 'full' ) ) : ?>
                        <div class="icon-container">
                            <?php the_post_thumbnail('full'); ?>
                        </div>
                    <?php endif; ?>
                    <div class="com-box-content">
                        <h3 class="title">
                            <a href="<?php the_permalink(); ?>"> <?php the_title() ?> </a>
                        </h3>
                        <p class="total-post"> <?php bbp_forum_topic_count(get_the_ID()); ?>
                            <?php esc_html_e(' Posts', 'forumax'); ?>
                        </p>
                    </div>
                    <!-- /.ama-com-box-content -->
                </div>
                <!-- /.ama-com-box -->
                <?php
            endwhile;
            wp_reset_postdata();
            ?>
        </div>
        <!-- /.communities-boxes -->
    </div>
    <!-- /.collapse-wrap -->
</div>
<!-- /.more-communities -->