<?php get_header(); ?>

    <h1 class="pagetit text-center">
        <?php post_type_archive_title(); ?>
    </h1>
    <section class="content">
        <div class="container">
            <?php if (have_posts()) : ?>
                <div class="row">
                    <?php while (have_posts()) : the_post(); ?>
                        <div class="col-lg-6 col-12">
                            <div class="set">
                                <a href="javascript:">
                                    <?php the_title(); ?>
                                    <i class="fa-solid fa-caret-down"></i>
                                </a>
                                <div class="accordion-content">
                                    <p>
                                        <?php echo(has_excerpt() ? get_the_excerpt() : get_excerpt('50')) ?>
                                    </p>
                                    <a class='main-button'
                                       href='<?php the_permalink(); ?>'
                                       title='<?php the_title(); ?>'>
                                        <span><?php _e('اقرأ المزيد', 'm7md') ?></span>
                                        <?php the_switch_language("<i class='fa-solid fa-arrow-left-long'></i>",
                                            "<i class='fa-solid fa-arrow-right-long'></i>") ?>
                                    </a>
                                </div>
                            </div>
                        </div>
                    <?php endwhile; ?>
                </div>
                <?php wp_pagenavi(); ?>
            <?php else : ?>
                <p>
                    <?php _e('عذرا ، يتم حاليا إضافة المحتوى', 'm7md') ?>
                </p>
            <?php endif; ?>
        </div>
    </section>

<?php get_footer(); ?>