Server IP : 89.26.249.46  /  Your IP : 216.73.216.42
Web Server : Apache
System : Linux a.cp.cloudlink.pt 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User : eticalga ( 1129)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/eticalga/www/files/themes/kobuxeticalgarve/templates/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/eticalga/www/files/themes/kobuxeticalgarve/templates/staff.php
<?php

/**
 * Template Name: Staff
 *
 * @package kobuxeticalgarve
 */

get_header();
?>

<div id="content">
	<?php while (have_posts()) : the_post(); ?>
		<?php include(locate_template('partials/page-top.php')); ?>

		<div class="site-content">
			<div class="container large">
				<?php get_template_part(
					'partials/archive-filters',
					'',
					array(
						'posttype' => 'staff'
					)
				); ?>
			</div>

			<?php
			$current_page = (get_query_var('paged')) ? get_query_var('paged') : 1;
			$args = array(
				'post_type'         => array('staff'),
				'post_status'       => array('publish'),
				'posts_per_page'    => 10,
				'paged'             => $current_page,
				'orderby'           => 'title',
				'order'             => 'ASC',
			);

			// Taxonomy queries
			$tax_query = array();

			if ($post_staff_cats_query = kobuxeticalgarve_get_query_var('categoria-staff')) {
				$tax_query[] = array(
					'taxonomy' => 'staff_cat',
					'field'    => 'slug',
					'terms'    => $post_staff_cats_query,
				);
			}
			if ($post_training_area_query = kobuxeticalgarve_get_query_var('area-de-formacao')) {
				$tax_query[] = array(
					'taxonomy' => 'training-area',
					'field'    => 'slug',
					'terms'    => $post_training_area_query,
				);
			}

			if (count($tax_query) > 0) {
				if (count($tax_query) > 1) {
					$tax_query['relation'] = 'AND';
				}
				$args['tax_query'] = $tax_query;
			}
			?>

			<div class="container large">
				<input id="posts-currentpage" type="hidden" name="currentpage" value="<?php echo $current_page; ?>">
				<div id="posts-wrapper">
					<?php
					$kobu_query = new WP_Query($args);
					$max_pages = $kobu_query->max_num_pages;

					if ($kobu_query->have_posts()) { ?>
						<?php kobuxeticalgarve_jump_page('prev', $current_page, $max_pages); ?>
						<ul class="articles-list">
							<?php
							while ($kobu_query->have_posts()) : $kobu_query->the_post();
								include(locate_template('partials/staff-card.php'));
							endwhile;
							?>
						</ul>
						<?php kobuxeticalgarve_jump_page('next', $current_page, $max_pages); ?>
					<?php } else { ?>
						<ul class="articles-list empty-content">
							<?php get_template_part('content', 'none'); ?>
						</ul>
					<?php } ?>
					<?php wp_reset_postdata(); ?>
				</div>
			</div>

			<?php
			the_content();
			?>
		</div>
	<?php endwhile; ?>
</div>
<?php get_footer(); ?>