File "project.php"

Full Path: /home/concvitk/public_html/wp-content/themes/conceptualizate/template-parts/project.php
File size: 3.2 KB
MIME-type: text/x-php
Charset: utf-8

<?php
    while( have_posts() ) : the_post(); ?>
    <section class="sidebar">

        <div class="project-info">
            <h2 class="text-primary">Acerca del proyecto</h2>

            <div class="project-content">
                <?php the_content();?>
            </div>
        </div>

        <?php
        endwhile;

        ?>

        <?php
            get_sidebar('project');
        ?>
    </section>

    <section class="other-details">
        <div class="featured-image-details">
            <a data-lightbox="images" href="<?php the_post_thumbnail_url(); ?>">
                <?php
                    if( has_post_thumbnail() ) {
                        the_post_thumbnail('full', $args = array(
                            'class' => 'featured-image',
                        ));
                    }
                ?>
            </a>
        </div>
        <div class="content-details center-content">
            <div class="info-details">
                <?php
                    $the_problem = get_field('the_problem');
                    $the_challenge = get_field('the_challenge');
                    $the_solution = get_field('the_solution');

                ?>
                <div class="box-details">
                    <h2>El problema</h2>
                    <p><?php echo esc_html($the_problem); ?></p>
                </div>

                <div class="box-details">
                    <h2>El Reto</h2>
                    <p><?php echo esc_html($the_challenge); ?></p>
                </div>

                <div class="box-details">
                    <h2>La Solución</h2>
                    <p><?php echo esc_html($the_solution); ?></p>
                </div>
            </div>
        </div>

        <div class="gallery container">
            <?php $gallery = get_field('galeria'); ?>
            <?php $imagen_1 = $gallery['imagen_1']['sizes']['large'];?>
            <?php $imagen_2 = $gallery['imagen_2']['sizes']['large'];?>
            <?php $imagen_3 = $gallery['imagen_3']['sizes']['large'];?>
            <?php $imagen_4 = $gallery['imagen_4']['sizes']['large'];?>

            <div class="gallery-image">
                    <a data-lightbox="images" href="<?php echo esc_attr($imagen_1) ?>">
                        <img src="<?php echo esc_attr( $imagen_1 ) ?>" alt="Imagen 1">
                    </a>
            </div>
            <div class="gallery-image">
                    <a data-lightbox="images" href="<?php echo esc_attr($imagen_2) ?>">
                        <img src="<?php echo esc_attr( $imagen_2 ) ?>" alt="Imagen 2">
                    </a>
            </div>
            <div class="gallery-image">
                    <a data-lightbox="images" href="<?php echo esc_attr($imagen_3) ?>">
                        <img src="<?php echo esc_attr( $imagen_3 ) ?>" alt="Imagen 3">
                    </a>
            </div>
            <div class="gallery-image">
                    <a data-lightbox="images" href="<?php echo esc_attr($imagen_4) ?>">
                        <img src="<?php echo esc_attr( $imagen_4 ) ?>" alt="Imagen 4">
                    </a>
            </div>
        </div>
    </section>