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/page2.php
<?php
	get_header();

	while ( have_posts() ) : the_post();
	$subtitle = get_post_meta(get_the_ID(), 'subtitle', true);
?>

<main role="main" class="l-flex">
	<div id="category-header">
		<div class="l-container l-flex">
			<div class="cat-header-container">
				<?php 
					if($subtitle){
				?>
					<h2 class="cat-name"><?php the_title(); ?></h2>
					<h1 class="cat-title"><?php echo $subtitle; ?></h1>
				<?php
					}
					else{
				?>
					<h1 class="cat-title"><?php the_title(); ?></h1>
				<?php } ?>
			</div>
		</div>
	</div>
	<div id="content-wrapper" class="l-container l-flex">
		<?php
			$gallery = get_field('gallery_post');
			$n = count($gallery);
			if($gallery){
				if($n > 1){
		?>
		<div id="post-slider" class="swiper-container">
			<div class="swiper-wrapper">
		<?php
					foreach($gallery as $img){
						$url = $img["image_gallery_post"]['url'];
						$alt = $img["image_gallery_post"]['alt'];
						$title = $img["image_gallery_post"]['title'];
		?>
				<div class="swiper-slide">
					<figure class="slide">
						<img class="slide-img" src="<?php echo $url; ?>" alt="<?php echo $alt; ?>" title="<?php echo $title; ?>" />
					</figure>
				</div>
		<?php
					}
		?>
			</div>
			<div class="swiper-pagination"></div>
		</div>
		<?php if(get_field('image_credit')): ?>
			<div class="img-credits"><?php the_field('image_credit') ?></div>
		<?php endif; ?>
		<?php
				}
				else{
					$url = $gallery[0]["image_gallery_post"]['url'];
					$alt = $gallery[0]["image_gallery_post"]['alt'];
					$title = $gallery[0]["image_gallery_post"]['title'];
		?>
			<figure class="post-img">
				<img class="slide-img" src="<?php echo $url; ?>" alt="<?php echo $alt; ?>" title="<?php echo $title; ?>" />
				<?php if(get_field('image_credit')): ?>
					<figcaption class="img-credits"><?php the_field('image_credit') ?></figcaption>
				<?php endif; ?>
			</figure>
		<?php
				}
			}
			elseif(has_post_thumbnail()){
				if(has_post_video()){
		?>
		<figure class="post-img">
			<?php the_post_thumbnail(); ?>
			<?php if(get_field('image_credit')): ?>
				<figcaption class="img-credits"><?php the_field('image_credit') ?></figcaption>
			<?php endif; ?>
		</figure>
		<?php
				}
				else{
					$image = wp_get_attachment_image_src(get_post_thumbnail_id($post->id), 'post-thumbnail');
					if(($image[1] > 600) && ($image[1] > $image[2])):
		?>
		<figure class="post-img">
			<?php the_post_thumbnail(); ?>
			<?php if(get_field('image_credit')): ?>
				<figcaption class="img-credits"><?php the_field('image_credit') ?></figcaption>
			<?php endif; ?>
		</figure>
		<?php
					endif;
				}
			}
		?>
		<section id="post-content">
			<article <?php post_class('l-flex'); ?> id="post-<?php the_ID(); ?>">
				<div class="post-content">
					<?php the_content(); ?>
				</div>
				<div class="post-tags">
					<?php the_tags('', ''); ?>
				</div>
			</article>
		</section>
		<?php get_sidebar(); ?>
	</div>
</main>

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