How can I modify a carousel to turn it into a next and preview pager?

0

From here take my example kladaar

On this page I have a product carousel with its attributes which I have to convert into a previous pager, next and this is in a kind of owl classes, how can I do it to make it work and work for me?

Deputy Code Fraction

<div id="cont-inmuebles-1" class="cont-inmuebles">
                <?php $filterVali = true;
                if($_POST['codigo'] != ''){
                    $filter = get_posts(array('post_type' => 'product', 'showposts' => '100', 'order' =>     'DESC'));
                    $i = 0;
                    foreach($filter as $fil):
                        if($_POST['codigo'] == $fil->sku){
                            $inmuebles[$i] = $fil;
                            $i++;
                        }else{
                            $cadena = strpos($fil->post_title, $_POST['codigo']);
                            if($cadena){
                                $inmuebles[$i] = $fil;
                                $i++;
                            }else if($_POST['codigo'] == $fil->post_title){
                                $inmuebles[$i] = $fil;
                                $i++;
                            }
                        }
                    endforeach;
                    #provincia
                }else if($_POST['tipo_propiedad'] != '' || $_POST['sector'] != '' || $_POST['habitaciones'] != '' || $_POST['precio-min'] != '' || $_POST['precio-max'] != ''){
                    $tipo_prod = ($_POST['tipo_propiedad'] != '') ? $_POST['tipo_propiedad'] : '';
                    $sector = ($_POST['sector'] != '') ? $_POST['sector'] : '';
                    $habitaciones = ($_POST['habitaciones'] != '') ? $_POST['habitaciones'] : '';
                    $precio_min = ($_POST['precio-min'] != '') ? $_POST['precio-min'] : '';
                    $precio_max = ($_POST['precio-max'] != '') ? $_POST['precio-max'] : '';

                    $inmuebles = filtros($tipo_prod, $sector, $habitaciones, $precio_min, $precio_max);

                }else{
                    $inmuebles = get_posts(array('post_type' => 'product', 'showposts' => '10', 'order' => 'DESC'));
                    $filterVali = false;
                    $i = 4;
                }
                if($i > 3){ ?>
                    <div class="owl-carousel">
                        <?php foreach($inmuebles as $inm):
                            $product = wc_get_product( $inm->ID );
                            //if($k == 0){echo '<div class="row no-margin">';} $k++; ?>
                                <div class="item">
                                    <a href="<?php echo $inm->guid; ?>" title="<?php echo $inm->post_title; ?>">
                                        <figure class="no-margin">
                                            <img src="<?php echo destacada_por_id($inm->ID); ?>" alt="<?php echo $inm->post_title; ?>" class="responsive-img">
                                            <figcaption class="ral-reg col-blanco fz-20"><?php echo '$'.number_format($product->price); ?></figcaption>
                                        </figure>
                                        <article class="ral-reg col-gris fz-20">
                                            <?php echo $inm->post_title; ?>
                                            <div class="fz-16">
                                                <?php $ubicacion = wc_get_product_terms($inm->ID, 'pa_ubicacion');
                                                $habitacion = wc_get_product_terms($inm->ID, 'pa_habitaciones');
                                                $banos = wc_get_product_terms($inm->ID, 'pa_banos');
                                                $tipo_prod = wc_get_product_terms($inm->ID, 'pa_tipo-de-propiedad');
                                                $area_cons = wc_get_product_terms($inm->ID, 'pa_area-construida'); ?>
                                                <aside><?php echo $ubicacion[0]; ?></aside>
                                                <span><i class="fa fa-bed"></i><?php echo $habitacion[0]; ?></span>
                                                <span><i class="fa fa-bath"></i>&nbsp;<?php echo $banos[0]; ?></span>
                                                <span><?php echo $tipo_prod[0]; ?></span>
                                                <span><i class="fa fa-home"></i>&nbsp;<?php echo $area_cons[0]; ?></span>
                                            </div>
                                        </article>
                                    </a>
                                </div>
                        <?php //if($k == 2){ echo '</div>'; $k = 0; }
                            endforeach; ?>
                    </div>
                <?php }else{ ?>
                        <div class="row">
                    <?php if(count($inmuebles) > 0){
                        foreach($inmuebles as $inm):
                        $product = wc_get_product( $inm->ID ); ?>
                            <div class="item col s12 m6 l3 xl3 no-padding">
                                <a href="<?php echo $inm->guid; ?>" title="<?php echo $inm->post_title; ?>">
                                    <figure class="no-margin">
                                        <img src="<?php echo destacada_por_id($inm->ID); ?>" alt="<?php echo $inm->post_title; ?>" class="responsive-img">
                                        <figcaption class="ral-reg col-blanco fz-20"><?php echo '$'.number_format($product->price); ?></figcaption>
                                    </figure>
                                    <article class="ral-reg col-gris fz-20">
                                        <?php echo $inm->post_title; ?>
                                        <div class="fz-16">
                                            <?php $ubicacion = wc_get_product_terms($inm->ID, 'pa_ubicacion');
                                            $habitacion = wc_get_product_terms($inm->ID, 'pa_habitaciones');
                                            $banos = wc_get_product_terms($inm->ID, 'pa_banos');
                                            $tipo_prod = wc_get_product_terms($inm->ID, 'pa_tipo-de-propiedad');
                                            $area_cons = wc_get_product_terms($inm->ID, 'pa_area-construida'); ?>
                                            <aside><?php echo $ubicacion[0]; ?></aside>
                                            <span><?php echo $habitacion[0]; ?>&nbsp;<i class="fa fa-bed"></i></span>
                                            <span><?php echo $banos[0]; ?>&nbsp;<i class="fa fa-bath"></i></span>
                                            <span><?php echo $tipo_prod[0]; ?></span>
                                            <span><i class="fa fa-home"></i>&nbsp;<?php echo $area_cons[0]; ?></span>
                                        </div>
                                    </article>
                                </a>
                            </div>
                    <?php endforeach; 
                        }else{ ?>
                            <div class="col s12">
                                <article class="ral-semi col-azul fz-30 center">
                                    <?php if(qtranxf_getLanguage() == "en"){ ?> We're sorry ... <br> No results found. <?php }else{ ?> Lo Sentimos...<br> No se encuentran resultados.<?php } ?>

                                </article>
                            </div>
                    <?php } ?>
                        </div>
                    <?php } ?>
            </div>
            <?php if(!$filterVali){ ?>
            <div id="cont-inmuebles-2" class="cont-inmuebles">
                <div id="item" class="owl-carousel">
                    <?php //$k = 0;
                        $inmuebles = get_posts(array('post_type' => 'product', 'showposts' => '10', 'order' => 'DESC'));
                        foreach($inmuebles as $inm):
                            $product = wc_get_product( $inm->ID );
                            //if($k == 0){echo '<div class="row no-margin">';} $k++; ?>
                            <!--<div class="col s12 m6 l3 xl3">-->
                                <div class="item">
                                    <a href="<?php echo $inm->guid; ?>" title="<?php echo $inm->post_title; ?>">
                                        <figure class="no-margin">
                                            <img src="<?php echo destacada_por_id($inm->ID); ?>" alt="<?php echo $inm->post_title; ?>" class="responsive-img">
                                            <figcaption class="ral-reg col-blanco fz-20">
                                                <?php echo '$'.number_format($product->price); ?></figcaption>
                                        </figure>
                                        <article class="ral-reg col-gris fz-20">
                                            <?php echo $inm->post_title; ?>
                                            <div class="fz-16">
                                                <?php $ubicacion = wc_get_product_terms($inm->ID, 'pa_ubicacion');
                                                $habitacion = wc_get_product_terms($inm->ID, 'pa_habitaciones');
                                                $banos = wc_get_product_terms($inm->ID, 'pa_banos');
                                                $tipo_prod = wc_get_product_terms($inm->ID, 'pa_tipo-de-propiedad');
                                                $area_cons = wc_get_product_terms($inm->ID, 'pa_area-construida'); ?>
                                                <aside><?php echo $ubicacion[0]; ?></aside>
                                                <span><?php echo $habitacion[0]; ?>&nbsp;<i class="fa fa-bed"></i></span>
                                                <span><?php echo $banos[0]; ?>&nbsp;<i class="fa fa-bath"></i></span>
                                                <span><?php echo $tipo_prod[0]; ?></span>
                                                <span><i class="fa fa-home"></i>&nbsp;<?php echo $area_cons[0]; ?></span>
                                            </div>
                                        </article>
                                    </a>
                                </div>
                            <!--</div>-->
                    <?php //if($k == 2){ echo '</div>'; $k = 0; }
                        endforeach; ?>
                </div>
            </div>
    
asked by ANDERSON CAÑAS 09.05.2018 в 19:41
source

0 answers