HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/www.colombia.co/public_html/wp-content/themes/colombia2016-old/allies.php

<?php
	/**
	* Template Name: Logos de Aliados
	*/

	get_header();

	$locale = get_locale();

	if($locale == "es_CO"){
		$category_ID = get_category_by_slug('aliados-logos')->term_id;
	}
	else if($locale == "en_US"){
		$category_ID = get_category_by_slug('allies')->term_id;
	}
	$subcats = get_categories(array(
			'child_of' => $category_ID
		)
	);
	$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
	while ( have_posts() ) : the_post();
	$subtitle = get_post_meta(get_the_ID(), 'subtitle', true);
?>

<main role="main" class="l-flex category-marca-colombia">
	<div id="modal">
		<button id="close-modal" type="button">+</button>
		<audio id="audio" src="" controls></audio>
		<video id="video" src="" controls></video>
	</div>
	<div id="category-header">
		<div class="l-container l-flex">
			<div class="cat-header-container">
				<?php 
					if(get_the_content()){
				?>
					<h2 class="cat-name"><?php the_title(); ?></h2>
					<h1 class="cat-title"><?php  the_excerpt() ?></h1>
				<?php
					}
					else{
				?>
					<h1 class="cat-title"><?php the_title(); ?></h1>
				<?php } ?>
				<div class="cat-description"><?php the_content(); ?></div>
			</div>
		</div>
	</div>
	<div id="content-wrapper" class="l-container l-flex">
		<section id="downloads">
			<?php
				if(is_array($subcats)&&!empty($subcats)){                                           
					//echo '<select id="downloads-filter">';
					/*echo '<option value="all">'.__('Seleccione la categoría', 'colombia').'</option>';
					foreach($subcats as $category){
						echo '<option value="category-'.$category->slug.'">'.$category->name.'</option>';
					}*/
					echo '</select>';
					foreach($subcats as $category){
						$query = new WP_Query(
							array(
								'post_type' => 'aliados_logos',
								'posts_per_page' => '-1',
								'cat' => $category->term_id
							)
						);
						echo '<div class="category-wrapper category-'.$category->slug.'">';
						echo '<h3 class="subcategory-name">'.$category->name.'</h3>';
						if($query->have_posts()) : while($query->have_posts()){
							$query->the_post();
			?>
				<article <?php post_class('download'); ?> id="post-<?php the_ID(); ?>">
					<figure class="download-img">
						<?php echo wp_get_attachment_image(get_post_meta(get_the_ID(), 'image_pt_nuestros_aliados', true), 'full' ); ?>
					</figure>
					<div class="download-info">
						<h2 class="download-title"><?php the_title(); ?></h2>
						<div class="download-actions">
							<div class="download-content"><?php the_content(); ?></div>
							<a href="" class="download-action download-action-play"><i class="icon-volume"></i><span><?php _e('Escuchar demo', 'colombia'); ?></span></a>
							<a href="" class="download-action download-action-play-video"><i class="icon-volume"></i><span><?php _e('Ver video', 'colombia'); ?></span></a>
							<a href="<?php echo get_post_meta(get_the_ID(), 'link_pt_nuestros_aliados', true); ?>" target="_blank" class="download-action download-action-download"  rel="nofollow">
								<i class="newicon-website"></i>
								<span><?php _e('Visitar sitio web', 'colombia'); ?></span>
							</a>
						</div>
					</div>
				</article>
			<?php
						}
						endif;
						echo '</div>';
						wp_reset_query();
					}
				}
			?>
		</section>
		<?php get_sidebar(); ?>
	</div>
</main>

<?php endwhile; ?>
<?php get_footer(); ?>