#SomosLaDC
<code><!–?php $args = array( ‘post_type’ => ‘sliders’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => -1
);</code>
$loop_slide = new WP_QUERY($args);
?>
<div class=”row r_slider”>
<div class=”small-12 medium-12 large-9 columns content-slide”>
<!–?php while ($loop_slide->have_posts()) : $loop_slide->the_post();<br ?–> //$link_tw = get_post_meta($post->ID, ‘_dc_link’, true);
$link_post = get_post_meta($post->ID, ‘_dc_link_post’, true);
//$user = get_post_meta($post->ID, ‘_dc_user’, true);
//$img_id = get_post_meta($post->ID, ‘_dc_avatar’, true);
//$avatar = wp_get_attachment_image_src($img_id, ‘full’);
$thumbID = get_post_thumbnail_id( $post->ID );
$slider = wp_get_attachment_image_src( $thumbID, ‘LARGE’ );
?>
<div class=”ctx-slider”><!–?php if ( $link_post !== ” ) : ?–>
<a href=”<?= $link_post; ?>”>
<img src=”<?= $slider[0]; ?>” />
</a>
<!–?php else : ?–>
<img src=”<?= $slider[0]; ?>” />
<!–?php endif; ?–></div>
</div>
<!–?php $args = array( ‘post_type’ => ‘post’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 3,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘category’,
‘field’ => ‘slug’,
‘terms’ => ‘destacado’
)
)
);
$loop_noticias = new WP_QUERY($args);
?>
<div class=”small-12 medium-12 large-3 columns”>
<!–?php while ($loop_noticias->have_posts()) : $loop_noticias->the_post();<br ?–> $thumbID = get_post_thumbnail_id( $post->ID );
$destacada = wp_get_attachment_image_src( $thumbID, ‘MEDIUM’ );
?>
<ul class=”ul_noticias_home”>
<li style=”list-style-type: none;”>
<ul class=”ul_noticias_home”>
<li>
<div class=”ctx_not”><a style=”color: #909090; <br /> text-decoration: none;” href=”<?= the_permalink(); ?>”>
<img src=”<?= $destacada[0]; ?>” /></a>
<h3 style=”text-align: justify;”></h3>
<div class=”ver_mas”>ver más</div>
</div></li>
</ul>
</li>
</ul>
</div>
</div>
<div class=”row r_menu_trending”>
<div class=”large-12 columns”>
<div class=”tit-des”>Noticias DC</div>
</div>
<div class=”small-12 medium-4 large-4 columns”><a href=”<?= home_url(); ?>/blog/?cat=nacionales”><img src=”<?= get_template_directory_uri(); ?>/img/img-nacional.jpg” /></a></div>
<div class=”small-12 medium-4 large-4 columns”><a href=”<?= home_url(); ?>/blog/?cat=regionales”><img src=”<?= get_template_directory_uri(); ?>/img/img-regionales.jpg” /></a></div>
<div class=”small-12 medium-4 large-4 columns”><a href=”<?= home_url(); ?>/blog/?cat=internacionales”><img src=”<?= get_template_directory_uri(); ?>/img/img-internacional2.jpg” /></a></div>
</div>
<!–?php <br ?–> /*
<div class=”row r_noticias”>
<!–?php $args = array( ‘post_type’ => ‘post’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 3,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘category’,
‘field’ => ‘slug’,
‘terms’ => ‘destacado’
)
)
);
$loop_noticias = new WP_QUERY($args);
?>
<div class=”large-12 columns”>
<!–?php while ($loop_noticias->have_posts()) : $loop_noticias->the_post();<br ?–> $thumbID = get_post_thumbnail_id( $post->ID );
$destacada = wp_get_attachment_image_src( $thumbID, ‘FULL’ );
?>
<ul class=”ul_noticias”>
<li style=”list-style-type: none;”>
<ul class=”ul_noticias”>
<li style=”min-height: 420px;”>
<div class=”ctx_not” style=”min-height: 420px;”>
<div class=”img_not” style=”background: url(<?= $destacada[0]; ?>) no-repeat center center; background-size: cover;”></div>
<div class=”contenido”></div>
<h3></h3>
<!–?= get_the_excerpt(); ?–>…
<div class=”ver_mas”>ver más</div>
</div></li>
</ul>
</li>
</ul>
</div>
</div>
*/?>
<div class=”row r_menu_trending”>
<div class=”large-12 columns”>
<div class=”tit-des” style=”margin-bottom: 0;”>Video Destacado</div>
</div>
</div>
<div class=”row r_noticias”>
<div class=”large-12 columns c_banners”>
<div class=”banners”>
<!–?php $args = array( ‘post_type’ => ‘videos’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 1
);
$loop_video = new WP_QUERY($args);
?>
<!–?php while ($loop_video->have_posts()) : $loop_video->the_post();<br ?–> $id_video = get_post_meta($post->ID, ‘_dc_video’, true);
$src = ‘https://www.youtube.com/embed/’.$id_video.’?rel=0&controls=0&showinfo=0′;
?>
<div class=”banner”><iframe src=”<?=” width=”100%” height=”100%”> frameborder=”0″ allowfullscreen></iframe></div>
<!–?php $args = array( ‘post_type’ => ‘banners’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 2
);
$loop_banners = new WP_QUERY($args);
?>
<!–?php while ($loop_banners->have_posts()) : $loop_banners->the_post();<br ?–> $thumbID = get_post_thumbnail_id( $post->ID );
$destacada = wp_get_attachment_image_src( $thumbID, ‘FULL’ );
?>
<div class=”banner”><img src=”<?= $destacada[0]; ?>” /></div>
</div>
</div>
</div>
<div class=”row r_somos_la_dc” style=”margin-bottom: 70px; margin-top: 70px;”>
<div class=”large-12 columns text-center”>
<ul>
<li style=”list-style-type: none;”>
<ul>
<li>
<div class=”block ctx_dc”>
<h2>Somos la DC</h2>
Conoce aquí aquellos que trabajan por un Chile mucho más justo.
<div class=”flecha”></div>
</div></li>
<li>
<div class=”block somos” style=”background: url(<?= get_template_directory_uri(); ?>/img/senadores.jpg) no-repeat center center;background-size: cover;”></div>
</li>
<li>
<div class=”block somos” style=”background: url(<?= get_template_directory_uri(); ?>/img/diputados.jpg) no-repeat center center;background-size: cover;”></div>
</li>
<li>
<div class=”block somos” style=”background: url(<?= get_template_directory_uri(); ?>/img/alcaldes.jpg) no-repeat center center;background-size: cover;”></div>
</li>
</ul>
</li>
</ul>
<!–
<li>
<a href=”<?= home_url(‘consejales’); ?>”>
<div class=”block somos” style=”background: url(<?= get_template_directory_uri(); ?>
/img/consejales.jpg) no-repeat center center;background-size: cover;”>
<h4>Consejales</h4>
</div>
</a></li>
<li>
<a href=”<?= home_url(‘consejeros-regionales’); ?>”>
<div class=”block somos” style=”background: url(<?= get_template_directory_uri(); ?>/img/consejeros.jpg) no-repeat center center;background-size: cover;”></div>
</a></li>
–>
</div>
</div>
<!–
<div class=”linea”></div>
–>
<!–?php $args = array( ‘post_type’ => ‘encuestas’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 1
);
$loop_encuestas = new WP_QUERY($args);
?>
<div class=”row r_opinion text-center”>
<!–?php while ($loop_encuestas->have_posts()) : $loop_encuestas->the_post();<br ?–> $opcion1 = get_post_meta($post->ID, ‘_dc_opcion1’, true);
$opcion2 = get_post_meta($post->ID, ‘_dc_opcion2’, true);
$opcion3 = get_post_meta($post->ID, ‘_dc_opcion3’, true);
?>
<input class=”id_encuesta” type=”hidden” value=”<?= get_the_id(); ?>” />
<div class=”large-12 columns”>
<h1>#MiOpiniónDC</h1>
<ul>
<li>
<div class=”ctx_voto”>
<div class=”opc”>Opción 01</div>
<div id=”vot1″ class=”votos”></div>
<div class=”resp”></div>
<div class=”btn_votar bt1″ data-id=”<?= get_the_id(); ?>” data-respuesta=”<?= $opcion1; ?>” data-num=”1″>Votar</div>
<!–
<div class=”avatares”></div>
–>
</div></li>
<li>
<div class=”ctx_voto”>
<div class=”opc”>Opción 02</div>
<div id=”vot2″ class=”votos”></div>
<div class=”resp”></div>
<div class=”btn_votar bt2″ data-id=”<?= get_the_id(); ?>” data-respuesta=”<?= $opcion2; ?>” data-num=”2″>Votar</div>
<!–
<div class=”avatares”></div>
–>
</div></li>
<li>
<div class=”ctx_voto”>
<div class=”opc”>Opción 03</div>
<div id=”vot3″ class=”votos”></div>
<div class=”resp”></div>
<div class=”btn_votar bt3″ data-id=”<?= get_the_id(); ?>” data-respuesta=”<?= $opcion3; ?>” data-num=”3″>Votar</div>
<!–
<div class=”avatares”></div>
–>
</div></li>
</ul>
</div>
</div>
<!–
<div class=”linea”></div>
–>
<div class=”row r_dc text-center”>
<div class=”large-12 columns” style=”margin-bottom: 30px;”>
<!–?php $args = array( ‘post_type’ => ‘bannerdc’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 1
);
$loop_bannerdc = new WP_QUERY($args);
?>
<!–?php if ($loop_bannerdc->have_posts()) :<br ?–> while ($loop_bannerdc->have_posts()) : $loop_bannerdc->the_post();
$link_banner = get_post_meta($post->ID, ‘_dc_link_banner’, true);
$id_banner = get_post_meta($post->ID, ‘_dc_banner_dc’, true);
$banner_dc = wp_get_attachment_url( $id_banner );
?>
<a href=”<?= $link_banner; ?>”><img src=”<?= $banner_dc; ?>” /></a>
<!–?php $args = array( ‘post_type’ => ‘editar-paginas’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 1
);
$loop_home_editar = new WP_QUERY($args);
?>
<!–?php if ($loop_home_editar->have_posts()) : while ($loop_home_editar->have_posts()) : $loop_home_editar->the_post();<br ?–> $titulo = get_post_meta($post->ID, ‘_dc_home_titulo’, true);
$bajada = get_post_meta($post->ID, ‘_dc_home_bajada’, true);
?>
<h1 class=”tit-home-dc” style=”margin-bottom: 50px; margin-top: 50px;”></h1>
<!–?= “&nbsp;”.$bajada; ?–>
<!–?php endwhile; wp_reset_postdata(); endif; ?–>
<ul>
<li>
<div class=”ctx_directiva”>
<div class=”ctx_icono”><img src=”<?= get_template_directory_uri(); ?>/img/ico_directiva.png” /></div>
<h2>DIRECTIVA NACIONAL</h2>
</div>
</li>
<li>
<div class=”ctx_directiva”>
<div class=”ctx_icono”><img src=”<?= get_template_directory_uri(); ?>/img/ico_consejo.png” /></div>
<h2>CONSEJO NACIONAL</h2>
</div>
</li>
<li>
<div class=”ctx_directiva”>
<div class=”ctx_icono”><img src=”<?= get_template_directory_uri(); ?>/img/ico_frentes.png” /></div>
<h2>FRENTES Y DEPARTAMENTOS</h2>
</div>
</li>
<li>
<div class=”ctx_directiva”>
<div class=”ctx_icono”><img src=”<?= get_template_directory_uri(); ?>/img/ico_sedes.png” /></div>
<h2>SEDES DEL PARTIDO</h2>
</div>
</li>
</ul>
</div>
</div>
<!–?php $args = array( ‘post_type’ => ‘links’,<br ?–> ‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘posts_per_page’ => 4
);
$loop_links = new WP_QUERY($args);
?>
<div class=”row r_link”>
<div class=”large-3 columns”>
<h2>Links de interés</h2>
</div>
<div class=”large-9 columns”>
<!–?php while ($loop_links->have_posts()) : $loop_links->the_post();<br ?–> $thumbID = get_post_thumbnail_id( $post->ID );
$destacada = wp_get_attachment_image_src( $thumbID, ‘FULL’ );
$link_interes = get_post_meta($post->ID, ‘_dc_link_interes’, true);
?>
<ul>
<li><a href=”<?= $link_interes; ?>” target=”_blank” rel=”noopener”><img src=”<?= $destacada[0]; ?>” /></a></li>
</ul>
</div>
</div>