Пример #1
0
/**
 * DEVUELVE EL HTML DE LOS INGREDIENTES
 */
function getHtmlIngredientes($ingredientes, $producto_id)
{
    $html = '<h2 class="[ text-center color-dark ][ no-margin--top ]">' . get_the_title($producto_id) . '</h2>';
    $html .= '<div class="[ row ]">';
    if (!empty($ingredientes)) {
        foreach ($ingredientes as $key => $ingrediente) {
            $html .= '<div class="[ col-xs-3 col-md-2 ]">';
            $html .= '<a class="[ box-content ]" href="' . site_url('/recetas/') . '?ingrediente=' . $ingrediente->ingrediente_id . '">';
            $url_img = attachment_image_url($ingrediente->ingrediente_id, 'medium');
            $html .= '<img class="[ image-responsive ]" alt="" src="' . $url_img . '">';
            $html .= '<p class="[ text-center ]">' . get_the_title($ingrediente->ingrediente_id) . '</p>';
            $html .= '</a>';
            $html .= '</div>';
        }
    }
    $html .= '</div>';
    $producto = wc_get_product($producto_id);
    $variations = $producto->get_available_variations();
    $addToCart = '';
    $costoVariationSemanal = 0;
    $costoTotal = 0;
    $html .= '<div class="[ card__radio-options ][ text-center color-dark ]">';
    $html .= '<div class="[ radio-options__label ]">';
    $html .= 'Entregas semanales durante:';
    $html .= '</div>';
    if (!empty($variations)) {
        $count = 1;
        foreach ($variations as $variation) {
            $name = getNameVariation($variation['variation_id']);
            $check = $count == 1 ? 'checked' : '';
            $nombreVariacion = getNameOriginVariation($variation['variation_id']);
            $cansatSemanal = getCostoCanastaTemporalidad($nombreVariacion, $variation['display_price']);
            if ($count == 1) {
                $addToCart = site_url('/mi-carrito/?add-to-cart=') . $variation['variation_id'];
                $costoVariationSemanal = $cansatSemanal;
                $costoTotal = $variation['display_price'];
            }
            $html .= '<label class="[ radio-options__selector__label ]" for="c9_meals-' . $variation['variation_id'] . '">';
            $html .= '<input ';
            $html .= 'id="c9_meals-' . $variation['variation_id'] . '"';
            $html .= 'data-costo="' . number_format($variation['display_price']) . '"';
            $html .= 'data-producto="' . $producto_id . '"';
            $html .= 'data-variacion="' . $variation['variation_id'] . '"';
            $html .= 'data-semanal="' . $cansatSemanal . '"';
            $html .= 'class="[ radio-options__selector ][ check-compra-modal ]" ';
            $html .= 'type="radio"';
            $html .= 'name="variaciones-00' . $producto_id . '"';
            $html .= 'value="c9"';
            $html .= $check;
            $html .= '>' . $name;
            $html .= '</label>';
            $count++;
        }
    }
    $html .= '</div>';
    $html .= '<div class="text-center">';
    $html .= '<a class="[ btn btn-secondary ] url-add-cart-product-modal-00' . $producto_id . '" href="' . $addToCart . '">Añadir al carrito</a>';
    $html .= '</div>';
    return $html;
}
Пример #2
0
<?php

get_header();
the_post();
?>
	<div class="[ main ]">
		<!--  Caribe description -->
		<section class="[ margin-bottom--large ]">
			<?php 
the_post_thumbnail('medium', ['class' => '[ visible-xs ][ img-responsive  ]']);
$url_img = attachment_image_url($post->ID, 'full');
?>
			<div class="[ hidden-xs ][ bg-image square img-destinos ]" style="background-image: url('<?php 
echo $url_img;
?>
');"></div>

			<div class="[ container ]">
				<h1 class="[ margin-top--large margin-bottom ] [ text-uppercase ][ text-center ][ color-secondary ] "><?php 
the_title();
?>
</h1>
				<div class="[ row ]">
					<div class="[ col-md-6 ][ col-md-offset-3 ][ margin-medium ]"><?php 
the_content();
?>
</div>
				</div>
			</div>
		</section>
		<!-- Excursiones -->
Пример #3
0
<?php

get_header();
the_post();
$id_img_por_que = get_post_meta($post->ID, 'imagen_por_que', true);
$url_image_porque = wp_get_attachment_image_src($id_img_por_que, 'full');
$id_img_pregunta = get_post_meta($post->ID, 'imagen_pregunta', true);
$url_image_pregunta = wp_get_attachment_image_src($id_img_pregunta, 'full');
$imagen = attachment_image_url($post->ID, 'full');
?>
	
	
	<div class="container-fluid video">

		<video class="bg-video background-image text-right col-sm-6 col-md-offset-6" autoplay id="bgvid">
		    <source src="http://the-sentry.dev/wp-content/uploads/2016/05/radikal.mp4" type="video/mp4">
		</video>
		<div id="video-image"class="background-image-radikal" style="background-image: url('<?php 
echo $imagen;
?>
')">
			<img id="image-radikal" src="<?php 
echo THEMEPATH;
?>
images/radikal.svg" alt="">

		</div>
	</div>
	<div class="container-fluid content-box_secundary">
		<div class="row">
			<div class="col-md-12 boxes_secundary">
Пример #4
0
get_header();
?>
<div class="[ main ]">
	<div class="[ container ][ margin-bottom ]">
		<div class="[ margin-top--large margin-bottom ]">
			<h1 class=" [ text-uppercase text-center font-heading ] [ color-secondary ] ">Promociones</h1>
		</div>
		<div class="[ row ][ padding--bottom--xxlarge ]">
			<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $barco_id = get_post_meta($post->ID, 'barco_promocion', true);
        $barco = get_post($barco_id);
        $url_img = attachment_image_url($post->ID, 'medium');
        $url_promo = get_post_meta($post->ID, 'url_promocion', true);
        ?>
					<div class="[ col-xs-12 col-sm-6 col-md-4 ]">
						<img class="[ img-responsive ][ margin-top ]" src="<?php 
        echo $url_img;
        ?>
">
						<div class="[ margin-top--small ]">
							<h3 class="[ color-primary ][ large ]">
								<span class="[ width-50 ][ inline-block align-middle ][ text-left ]">
									<?php 
        the_title();
        ?>
								</span><span
								class="[ width-40 ][ inline-block align-middle ][ text-right ]">
Пример #5
0
						<?php 
    }
}
?>

				</div>

				<!-- Áreas publicas -->
				<h3 class="[ text-center ][ color-primary ][ margin-bottom ]">Áreas públicas</h3>
				<div class="[ row ][ color-primary grid actividades-archive ]">

					<?php 
$areas_publicas = getActivitisShip($post->ID);
if (!empty($areas_publicas)) {
    foreach ($areas_publicas as $key => $area_publica) {
        $url_img = attachment_image_url($area_publica->activity_id, 'medium');
        ?>
							<div class="[ col-xs-6 col-md-3 ][ margin-bottom--small grid-item ]">

								<img class="[ img-responsive ][ margin-bottom--small ]" src="<?php 
        echo $url_img;
        ?>
">
								<?php 
        $actividad_costo = get_post_meta($area_publica->activity_id, 'actividad_costo', true);
        if ($actividad_costo) {
            ?>
									<img class="[ pull-right ][ svg ][ icon icon--iconed--large icon--stroke ][ danger ]" src="<?php 
            echo THEMEPATH;
            ?>
icons/money-bag-dollar.svg">
Пример #6
0
?>


	<section class="[ container ]">
		<h1 class="[ h2 text-center ]"><?php 
the_title();
?>
</h1>
		<div class="[ row ][ margin-bottom--large ]">
			<!--  Entradas Blog -->

			<?php 
if ($blog->have_posts()) {
    while ($blog->have_posts()) {
        $blog->the_post();
        $url_img = attachment_image_url($post->ID, 'img_blog');
        ?>

					<article class="[ col-xs-12 col-sm-6 col-md-3 ]">
						<h5><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h5>
						<a href="<?php 
        the_permalink();
        ?>
"><img class="[ img-responsive ]" src="<?php 
        echo $url_img;
Пример #7
0
?>
							</div>
						</div>
						<div class="col-sm-6 image background-image" style="background: url('<?php 
echo $imagen;
?>
')"></div>
					</div>				
				</div>
			</div>
			<div class="col-md-12 boxes_secundary two">
				<div class="box_secundary">
					<div class="row box_secundary-content">
						<?php 
$mision = get_page_by_path('mision-y-vision');
$imagen_mision = attachment_image_url($mision->ID, 'medium');
?>
						<div class="col-sm-6 description">
							<blockquote class="box_secundary-title"><?php 
echo $mision->post_title;
?>
</blockquote>
							<div class="box_secundary-subtitle">
								<?php 
echo wpautop($mision->post_content);
?>
							</div>
						</div>
						<div class="col-sm-6 image background-image" style="background: url('<?php 
echo $imagen_mision;
?>
Пример #8
0
the_title();
?>
</h1>
			<div class="[ row ][ margin-bottom--large ]">
                 <?php 
$args = array('post_type' => 'product', 'posts_per_page' => 12);
$productos = new WP_Query($args);
if ($productos->have_posts()) {
    while ($productos->have_posts()) {
        $productos->the_post();
        $producto = wc_get_product(get_the_ID());
        $variations = $producto->get_available_variations();
        $addToCart = '';
        $costoVariationSemanal = 0;
        $costoTotal = 0;
        $imagen = attachment_image_url(get_the_ID(), 'img_productos');
        $imagen_prod = $imagen != '' ? $imagen : '';
        ?>
                        <article class="[ col-xs-12 col-sm-4 ]">
                            <div class="[ card ]">
                                <div class="[ card__header ]">
                                        <h3 class="[ card__title ]"><?php 
        the_title();
        ?>
</h3>
                                        <h5 class="[ card__subtitle ][ hidden ]">para 1 persona</h5>
                                </div>
                                <div class="[ card__image ]">
                                        <img class="[ img-responsive ]" src="<?php 
        echo $imagen;
        ?>
Пример #9
0
/**
 * REGRESA MAS ACTIVIDADES
 */
function ajax_mas_actividades()
{
    $offset = isset($_POST['offset']) ? $_POST['offset'] : 0;
    $limit = isset($_POST['limit']) ? $_POST['limit'] : 0;
    $actividades = new WP_Query(['posts_per_page' => $limit, 'offset' => $offset, 'post_type' => 'actividades']);
    $new_arr = array();
    foreach ($actividades->posts as $key => $actividad) {
        $new_arr[$key] = $actividad;
        $new_arr[$key]->url_img = attachment_image_url($actividad->ID, 'thumbnail');
        $new_arr[$key]->tiene_costo = get_post_meta($actividad->ID, 'actividad_costo', true);
    }
    if (!empty($actividades->posts)) {
        wp_send_json(array(1, $new_arr));
    }
    if ($validado == 1) {
        wp_send_json(array(0, 'final'));
    }
}
Пример #10
0
							</div>
						</a>
					</div>
				</div>
			<?php 
}
?>
			<div class="[ row ]">
				<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        if (isset($no_post[$post->ID])) {
            continue;
        }
        $img_barco = attachment_image_url($post->ID, 'medium');
        ?>
						<div class="[ col-xs-12 col-sm-6 ]">
							<a href="<?php 
        the_permalink();
        ?>
"><img class="[ img-responsive ][ margin-bottom--small ]" src="<?php 
        echo $img_barco;
        ?>
"></a>
							<a href="<?php 
        the_permalink();
        ?>
"><p class=" [ text-primary ][ margin-bottom ] "><?php 
        the_title();
        ?>
Пример #11
0
the_post();
$no_id = $post->ID;
$user = get_user_by('id', $post->post_author);
?>

    <div class="[ container ]">
        <div class="[ row ]">
        <!--  Entrada single Blog -->
            <div class="[ col-xs-12 col-md-8 ][ user-content ]">
                <article>
                    <h5><?php 
the_title();
?>
</h5>
                    <?php 
$url_img = attachment_image_url($post->ID, 'large');
?>
                    <img src="<?php 
echo $url_img;
?>
">
                    <p><?php 
echo getDateTransform($post->post_date);
?>
 By <?php 
echo $user->user_login;
?>
</p>
                    <hr>
                    <?php 
the_content();