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/category-aliados.php
<?php
require_once 'functions/slider.php';

get_header();

$locale = get_locale();
//echo "local=>".$locale; exit();
global $wp_query, $paged;
// $catcontent_id =  34273; //local es
// $first_post_id =  34285; // local es
// $second_post_id = 34288; //local es
// $third_post_id =  34292; //local es
$catcontent_id = 0; //stage es
$first_post_id = 0; // stage es
$second_post_id = 0; //stage es
$third_post_id = 0; //stage es
if ($locale == "es_CO") {
    $category_ID = 13;
    $catcontent_id = 36924; //stage es
    $first_post_id = 34276; // stage es
    $second_post_id = 34281; //stage es
    $third_post_id = 34286;
    $contact_form_id = 34315;
    $emprasa_id = 27944;
    $news_id = 36;
} else if ($locale == "en_US") {
//		$category_ID = 1941;
//                $catcontent_id = 34290; 
//                $first_post_id =  34276; 
//        	$second_post_id = 34281; 
//        	$third_post_id =  34286;
//                $contact_form_id = 34294;
//                $emprasa_id = 1962;
//                $news_id = 20;

    /*Stage id*/
    $category_ID = 2074;
    $catcontent_id = 34272;
    $first_post_id = 34312;
    $second_post_id = 34313;
    $third_post_id = 34314;
    $contact_form_id = 34316;
    $emprasa_id = 2075;
    $news_id = 2081;


} else if ($locale == "fr_FR") {
    $category_ID = 234;
    $catcontent_id = 34298;
    $first_post_id = 34276;
    $second_post_id = 34281;
    $third_post_id = 34286;
    $contact_form_id = 34301;
    $emprasa_id = 235;
    $news_id = 50;
}


//$cat_id = get_cat_ID(single_cat_title('', false));
//$general_setting_data   = get_field('category_slider', 'category_' . $cat_id);
$acf_slider = get_field('category_slider', 'category_' . $category_ID);
$cat_dropdown = get_categories(
    array('parent' => $category_ID)
);
$news_section = new WP_Query(array('cat' => $news_id,
        'posts_per_page' => 3,
        'orderby' => 'rand'
    )
);

    // Acá definimos $subtitulo, $category_color y $category_image para usarlos donde sea necesario
    $images = get_option('taxonomy_image_plugin'); // get the taxonomy images array
    if( array_key_exists( $category_ID, $images ) ) { // check if term has an image
        $category_image = wp_get_attachment_image_src( $images[$category_ID], 'full' ); // if it does, echo that image
    }
    $category_color = get_term_meta( $category_ID , 'category_color', true );
   
    $subtitulo = get_term_meta( $category_ID , 'category_subtitle', true );
   
    // color texto titulos
    $title_color = get_term_meta($category_ID, 'color_titulo_categoria', true);
    // color texto subtitulos
    $subtitle_color = get_term_meta($category_ID, 'color_descripcion', true);
    // color background banner
    $banner_category_color = get_term_meta($category_ID, 'color_banner_categoria', true);

?> <style>
        <?php             
        /*Estos estilos se dejan para la categoria de banners ya que son dinamicos*/
            if(($category_image)||($category_color)): ?>
                #category-header .cat-description, #post-header .cat-description {
                    padding: 3% 10%;
                    margin: auto;
                }
                .container-header-one {
                    background-color: <?php echo $banner_category_color; ?>; 
                    background-size: inherit;
                    width: 25%;
                    float:left;    
                    padding: 5% 0 0 0;    
                    height: 550px;
                }
                #category-header h1.cat-title {            
                    color: <?php echo $title_color ?>;
                }
                #category-header {
                    background-image: inherit!important;
                    background-size: cover;
                }
                .container-header-two {
                    background-image: url(<?php echo $category_image[0]; ?>);
                    background-size: cover;
                    width: 75%;
                    float:left;
                    display:block;
                    background-repeat: no-repeat;    
                    height: 550px;
                }
                .cat-description p{
                    color: <?php echo $subtitle_color; ?>;                
                }
                @media screen and (max-width: 1366px){
                    #category-header .cat-title {
                        padding: 7%!important;
                    }
                    .container-header-one {    
                        padding: 3% 0;    
                        height: 422px;
                    }
                    .container-header-two {  
                        height: 422px;
                    }
                    body.archive.category #category-header {
                        height: 414px;
                    }
               }
               @media screen and (max-width:800px) {
                    .container-header-one {
                        width: 100%;
                    }
                    .container-header-two {
                        display:none;
                    }
                }
            <?php endif; ?>
    </style>
    <main class="alidos alidos-in">
        <!-- <?php colombiaco_slider($acf_slider); ?> -->

        <section>  
            <div id="category-header" style="background-image:url('<?php echo $category_image[0]; ?>')">
                <div class="container-header-one">
                   <h1 class="cat-title"><?php echo $subtitulo; ?></h1>
                   <?php $cat_desc = category_description(get_cat_ID(single_cat_title('', false))); ?>
                   <?php
                   if ($cat_desc) {
                   ?>
                       <div class="cat-description"><?php echo $cat_desc; ?></div>
                   <?php } ?>
               </div> 
               <div class="container-header-two"></div>        
            </div>
            <div id="content-wrapper" class="l-container l-flex"> 
                <div class="content-box"> 
                    <div class="inner-box-over">
                        <!-- <div class="iframe">
                            <i> <img src="<?php bloginfo('template_directory'); ?>/img/playbutton.png" class="click-play" id="play-click"/> </i>
                            <iframe src="https://www.youtube.com/embed/<?php echo get_field('youtube_video', $catcontent_id); ?>?" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen id="iframe-play"></iframe>
                        </div> -->
                        <?php
                        if (get_field("beneficios_image", $catcontent_id) != "") {
                            if (get_field("beneficios_image_link", $catcontent_id) == 'yes') { ?>
                                <a href="<?php echo get_field("beneficios_link", $catcontent_id); ?>" <?php if (get_field("beneficios_image_open_new_tab", $catcontent_id) == 'yes') { ?> target="_blank" <?php } ?>> <?php } ?><img class="img-responsive"
                                                                                                                                                                                                                                     src="<?php echo get_field("beneficios_image", $catcontent_id); ?>"> <?php if (get_field("beneficios_image_link", $catcontent_id) == 'yes') { ?> </a> <?php }
                        } ?>
                        <div class="detailpart">
                            <h2><?php echo get_field("aliado_title", $catcontent_id); ?></h2>
                            <?php echo get_field("aliado_description", $catcontent_id); ?>
                            <?php

                            $box_one_internal_or_external_link = get_field("box_one_internal_or_external_link", $catcontent_id);
                            $box_one_link = get_field("box_one_link", $catcontent_id);
                            $box_one_title = get_field("box_one_title", $catcontent_id);
                            $box_one_description = get_field("box_one_description", $catcontent_id);
                            $box_one_image = get_field("box_one_image", $catcontent_id);

                            $box_two_internal_or_external_link = get_field("box_two_internal_or_external_link", $catcontent_id);
                            $box_two_link = get_field("box_two_link", $catcontent_id);
                            $box_two_title = get_field("box_two_title", $catcontent_id);
                            $box_two_description = get_field("box_two_description", $catcontent_id);
                            $box_two_image = get_field("box_two_image", $catcontent_id);

                            $box_three_internal_or_external_link = get_field("box_three_internal_or_external_link", $catcontent_id);
                            $box_three_link = '/aliados/preguntas-frecuentes-alianzas-marca-pais/';
                            // $box_three_link = get_field("box_three_link", $catcontent_id);
                            $box_three_title = get_field("box_three_title", $catcontent_id);
                            $box_three_description = get_field("box_three_description", $catcontent_id);
                            $box_three_image = get_field("box_three_image", $catcontent_id);
                            ?>


                        </div>

                        <div class="detailpart no-border">
                            <h2>Conviértete en aliado de Marca País</h2>
                        </div>

                        <section id="country_brand" class="l-flex country_brand first-l-flex">

                            <?php
                            /*		$first_queried_post = get_post($first_post_id);
                                    $title_first = $first_queried_post->post_title;
                                    $excerpt_first = $first_queried_post->post_excerpt;
                                    $first_image = get_field('thumb_post', $first_post_id);
                                    $second_queried_post = get_post($second_post_id);
                                    $title_second = $second_queried_post->post_title;
                                    $excerpt_second = $second_queried_post->post_excerpt;
                                    $second_image = get_field('thumb_post', $second_post_id);
                                    $third_queried_post = get_post($third_post_id);
                                    $title_third = $third_queried_post->post_title;
                                    $excerpt_third = $third_queried_post->post_excerpt;
                                    $third_image = get_field('thumb_post', $third_post_id); */
                            ?>
                            <article class="category- post-31445 post type-post status-publish format-standard has-post-thumbnail hentry category-actualidad category-noticias tag-bogota tag-cartagena tag-colombia tag-gastronomia tag-pereira tag-visita-colombia" id="post-28546">
                                <figure class="post-img">
                                    <img src="https://colombia.co/wp-content/uploads/2022/06/Piezas_Actualización_Mesa-de-trabajo-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="<?php echo $box_one_title; ?>">
                                </figure>
                                <div class="post-category">
                                    <ul class="post-categories">
                                        <li>1</li>
                                    </ul>
                                </div>
                                <div class="post-title">
                                    <h2><?php echo $box_one_title; ?></h2>
                                </div>
                                <a href="<?php echo $box_one_link; ?>" <?php if ($box_one_internal_or_external_link == 'external') { ?> target="_blank" <?php } ?> >
                                    <div class="post-excerpt">
                                        <div class="excerpt-wrapper">
                                            <p><?php echo $box_one_description; ?></p>
                                            <span class="read-more"><i class="icon-read-more"></i><br>
									<?php

                                    if ($locale == "es_CO") {
                                        echo "Ver más";
                                    } else if ($locale == "en_US") {
                                        echo "Read More";
                                    } else if ($locale == "fr_FR") {
                                        echo "Lire la suite";
                                    }
                                    ?>
								</span>
                                        </div>
                                    </div>
                                </a>
                            </article>
                            <!--
                            <article class="category- post-31445 post type-post status-publish format-standard has-post-thumbnail hentry category-actualidad category-noticias tag-bogota tag-cartagena tag-colombia tag-gastronomia tag-pereira tag-visita-colombia" id="post-28546">
                                <figure class="post-img">
                                    <img src="https://www.colombia.co/wp-content/uploads/2022/06/Piezas_Actualizacio%cc%81n_Mesa-de-trabajo-1-copia.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="<?php // echo $box_two_title; ?>">
                                </figure>
                                <div class="post-category">
                                    <ul class="post-categories">
                                        <li>2</li>
                                    </ul>
                                </div>
                                <div class="post-title">
                                    <h2><?php // echo $box_two_title; ?></h2>
                                </div>
                                <a href="<?php // echo $box_two_link; ?>" <?php //if ($box_two_internal_or_external_link == 'external') { ?> target="_blank" <?php // } ?>>
                                    <div class="post-excerpt">
                                        <div class="excerpt-wrapper">
                                            <p><?php // echo $box_two_description; ?></p>
                                            <span class="read-more"><i class="icon-read-more"></i><br>
								
								<?php
                                /*
                                if ($locale == "es_CO") {
                                    echo "Ver más";
                                } else if ($locale == "en_US") {
                                    echo "Read More";
                                } else if ($locale == "fr_FR") {
                                    echo "Lire la suite";
                                }*/
                                ?>
								
								</span>
                                        </div>
                                    </div>
                                </a>
                            </article>
                            -->
                            <article class="category- post-31445 post type-post status-publish format-standard has-post-thumbnail hentry category-actualidad category-noticias tag-bogota tag-cartagena tag-colombia tag-gastronomia tag-pereira tag-visita-colombia" id="post-28546">
                                <figure class="post-img">
                                    <img src="https://old.colombia.co/wp-content/uploads/2022/06/Piezas_Actualizacio%cc%81n_Mesa-de-trabajo-1-copia-2.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="<?php echo $box_three_title; ?>">
                                </figure>
                                <div class="post-category">
                                    <ul class="post-categories">
                                        <li>2</li>
                                    </ul>
                                </div>
                                <div class="post-title">
                                    <h2><?php echo $box_three_title; ?></h2>
                                </div>
                                <a href="<?php echo $box_three_link; ?>" <?php if ($box_three_internal_or_external_link == 'external') { ?> target="_blank" <?php } ?>>
                                    <div class="post-excerpt">
                                        <div class="excerpt-wrapper">
                                            <p><?php echo $box_three_description; ?></p>
                                            <!-- <span class="read-more"><i class="icon-read-more"></i><br>Read more</span> -->
                                            <span class="read-more"><i class="icon-read-more"></i><br/>
								<?php

                                if ($locale == "es_CO") {
                                    echo "Ver más";
                                } else if ($locale == "en_US") {
                                    echo "Read More";
                                } else if ($locale == "fr_FR") {
                                    echo "Lire la suite";
                                }
                                ?>
                                                <?php // _e('Ver más', 'colombia'); ?>
								
								</span>
                                        </div>
                                    </div>
                                </a>
                            </article>

                            <div id="pagination">
                                <!-- 	<a calss="btn-secondary" href="<?php echo get_category_link('3154'); ?>"> conoce nuestros aliados</a> -->
                                <button class="btn-secondary" type="button" onclick="window.location.replace('<?php echo get_permalink($emprasa_id); ?>')">conoce nuestros aliados</button>
                                <!-- <button id="load-more" class="btn-secondary" type="button" data-current-page="0" data-total-pages="4">conoce nuestros aliados</button> -->
                            </div>

                            <div id="temp-posts"></div>
                        </section>

                    </div>
                    <!--<div class="notias-view">
					 <section  class="page-template-contact">
						<article id="page-content">
							<p>Si tienes preguntas sobre la Marca País Colombia, o tienes algo que contarnos, puedes hacerlo a través de este formulario.</p>
							<?php echo do_shortcode('[contact-form-7 id="' . $contact_form_id . '" title="Formulario de contacto (aliados)"]');  //local?>
							<?php //echo do_shortcode( '[contact-form-7 id="34304" title="Formulario de contacto (aliados)"]' ); //stage?>
						</article>
					</section>	 -->

                    <div class="detailpart no-border">
                        <h2>Noticias de aliados</h2>
                    </div>
                    <section id="country_brand" class="l-flex country_brand">
                        <?php while ($news_section->have_posts()) : $news_section->the_post();//echo the_ID();?>
                            <article class="category- post-28368 post type-post status-publish format-standard has-post-thumbnail hentry category-esta-es-colombia category-regiones-del-pais category-turismo category-turismo-por-regiones tag-colombia tag-regiones-de-colombia tag-turismo tag-viajes"
                                     id="post-28368">
                                <figure class="post-img">
                                    <?php

                                    $featured_img_url = get_the_post_thumbnail_url(get_the_ID(), 'thumbnail');

                                    if (empty($featured_img_url)) {
                                        $thumb = get_field('thumb_post', get_the_ID());
                                        if ($thumb) {
                                            $featured_img_url = $thumb['sizes']['medium'];
                                        }
                                    }
                                    ?>

                                    <img src="<?php echo $featured_img_url; ?>" class="attachment-post-thumbnail size-post-thumbnail wp-post-image">
                                </figure>
                                <div class="post-category">
                                    <ul class="post-categories">
                                        <?php //$category_detail=get_the_category(get_the_ID());

                                        ?>
                                        <li><a>noticias</a></li>
                                    </ul>
                                </div>
                                <div class="post-title">
                                    <h2><?php echo get_the_title(); ?></h2>
                                </div>
                                <a href="<?php echo get_permalink(); ?>">
                                    <div class="post-excerpt">
                                        <div class="excerpt-wrapper">
                                            <p><?php echo get_the_excerpt() ?></p>
                                            <span class="read-more"><i class="icon-read-more"></i><br>Read more</span>
                                        </div>
                                    </div>
                                </a>
                            </article>
                        <?php endwhile; ?>

                        <div id="pagination">
                            <button class="btn-secondary" type="button" onclick="window.location.replace('<?php echo get_category_link($news_id); ?>')">ver más</button>
                        </div>
                        <!-- </div> -->
                        <div class="notias-view">

                            <section class="page-template-contact">
                                <article id="page-content">
                                    <!--<p>Si tienes preguntas sobre la Marca País Colombia, o tienes algo que contarnos, puedes hacerlo a través de este formulario.</p>-->
                                    <?php /* TODO Desabilitar formulario licencia de uso Marca Colombia: 22-oct-2020 */ /*echo do_shortcode('[contact-form-7 id="' . $contact_form_id . '" title="Formulario de contacto (aliados)"]'); */ ?>
                                    <?php //echo do_shortcode( '[contact-form-7 id="34304" title="Formulario de contacto (aliados)"]' ); //stage?>
                                </article>
                            </section>

                        </div>
                </div>


                <?php
                get_sidebar();
                ?>

        </section>

        </div>
    </main>


<?php get_footer(); ?>