Ejemplo n.º 1
0
function update_pool_content($selection = '', $id_parent = null, $id_ancestor = null)
{
    switch ($selection) {
        // General
        case 'supercat':
            $html = get_supercat_items();
            break;
            // Vins
        // Vins
        case 'cat-vins':
            $html = get_cat_vins_items();
            break;
        case 'regions-du-monde':
            $html = get_regions_monde_items();
            break;
        case 'pays':
            $html = get_items('v_all_pays', $id_parent, 'pays', 'nom_pays', 'id_pays');
            break;
        case 'regions':
            $html = get_items('v_all_regions', $id_parent, 'region', 'nom_region', 'id_region');
            break;
        case 'sous-regions':
            $html = get_items('v_all_sous_regions', $id_parent, 'sous-region', 'nom_sous_region', 'id_sous_region');
            break;
        case 'vins':
            $html = get_wines($id_parent, $id_ancestor);
            break;
            // Divers
        // Divers
        case 'promotions':
            $html = get_promotions();
            break;
        case 'divers':
            $cat_vin = $id_ancestor == 'undefined' ? $id_parent : $id_ancestor;
            $id_cat_vin = substr($cat_vin, -1);
            if ($id_cat_vin <= 5) {
                $html .= get_vins_au_verre($id_cat_vin);
            }
            if ($id_cat_vin <= 5) {
                $html .= get_demi_bouteilles($id_cat_vin);
            }
            break;
            // Alcool
        // Alcool
        case 'cat-alcool':
            //$html = get_cat_alcool_items();
            break;
        case 'alcools':
            //$html = get_alcools();
            break;
    }
    echo $html;
}
Ejemplo n.º 2
0
<img src="<?php 
the_field('global_header_image', 'options');
?>
" alt="" />

<?php 
$current_vineyard_id = get_the_id();
$wines = get_wines($current_vineyard_id);
?>

<div class="container grower-single">
  <h1><?php 
the_field('grower_title');
?>
</h1>
  <img src="<?php 
the_field('grower_image_full');
?>
" alt="<?php 
the_field('grower_title');
?>
">
  <dl class="grower-details">
    <dt>Owner:</dt>
    <dd><?php 
the_field('grower_owner');
?>
</dd>
    <dt>Location/Region/AVA:</dt>
    <dd><?php 
the_field('grower_location');