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/embajadasyconsulados.procolombia.co/public_html/wp-content/themes/colombia2016/page.php
<?php
	get_header();

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

<main role="main" class="l-flex">
	<?php  
	// si la pagina no es el login se muestra el titulo normalmente => 
	if (strpos($uri, 'login') === false) { ?>
		<div id="category-header">
			<div class="l-container l-flex">
				<div class="cat-header-container">
					<?php
					if($subtitle){
					?>
						<h1 class="cat-title"><?php the_title(); ?></h1>
						<h2 class="cat-name"><?php echo $subtitle; ?></h2>
					<?php
						}
						else{
					?>
						<h1 class="cat-title"><?php the_title(); ?></h1>
					<?php } ?>
				</div>
			</div>
		</div>
	<?php // si la pagina no es el login se muestra el titulo normalmente <=
	}else{ ?>
		<div class="header_login">
			<div class="wrapper-header">
				<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/img/logos/footer_logo_gobierno.png" alt="">
				<h2><?php echo esc_html( get_bloginfo( 'name' ) ); ?></h2>
			</div>
			<div class="subheader">
				<h1><?php the_title(); ?></h1>
				<p class="info_header">
					<strong>
						BIENVENIDO a este espacio creado como herramienta 
						para la promoción de la inversión, las exportaciones 
						y el turismo de Colombia.
					</strong>
				</p>
			</div>			
		</div>		
	<?php } ?>

	<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;
				}
			}
		?>
		<?php 
		if( strpos($uri, 'login') !== false ){
			$class_unica = 'login-section';
		}else if( strpos($uri, 'terminos') !== false || strpos($uri, 'condiciones') !== false ){
			$class_unica = 'terminos-page';
		}
		?>
		<?php if( strpos($uri, 'login') === false ){ ?>			
			<section id="breadcromp">
			    <ul>
			        <li>
			            <a href="<?php echo home_url(); ?>/" rel="home">< Inicio </a>
			        </li>
			        <li>
			            <strong>- <?php the_title(); ?></strong>
			        </li>
			    </ul>
			</section>
		<?php } ?>
		<section id="post-content" <?php if ( isset($class_unica) ) { ?>class="<?php echo $class_unica; ?>"<?php } ?> >
			<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 if( is_user_logged_in() && ( strpos($uri, 'terminos') === false || strpos($uri, 'condiciones') === false ) ){
			var_dump(is_user_logged_in());
			get_sidebar();
		} ?>
	</div>
</main><!-- page(hpp) -->

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