<?php
/**
 * Faculty archive template.
 *
 * @package BASCO_UAE
 */

get_header(); ?>

<?php
if ( function_exists( 'elementor_theme_do_location' ) && elementor_theme_do_location( 'archive' ) ) :
	// Elementor rendered the archive.
else :
?>

<header class="page-header">
	<div class="container">
		<h1><?php esc_html_e( 'Faculty', 'basco-uae' ); ?></h1>
		<?php basco_uae_breadcrumbs(); ?>
	</div>
</header>

<main id="content" class="section">
	<div class="container">
		<?php if ( have_posts() ) : ?>
			<div class="speakers-grid">
				<?php while ( have_posts() ) : the_post();
					get_template_part( 'template-parts/speaker', 'card' );
				endwhile; ?>
			</div>

			<?php
			the_posts_pagination( array(
				'mid_size'  => 2,
				'prev_text' => __( '← Previous', 'basco-uae' ),
				'next_text' => __( 'Next →', 'basco-uae' ),
			) );
			?>
		<?php else : ?>
			<p><?php esc_html_e( 'No faculty members have been added yet. Add them from the WordPress admin → Faculty.', 'basco-uae' ); ?></p>
		<?php endif; ?>
	</div>
</main>

<?php endif; // End Elementor archive location check. ?>

<?php get_footer(); ?>
