-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-noticias.php
51 lines (35 loc) · 1.61 KB
/
single-noticias.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php get_header(); ?>
<div class="contenedor-wide">
<div class="contenedor-noticias">
<?php the_field('titulo'); ?>
<div class="imagen-noticias">
<?php the_post_thumbnail('noticias'); ?>
</div>
<?php the_field('autor'); ?>
<?php the_field('contenido_historia'); ?>
</div>
<?php
$args = array(
'post_type' => 'productos',
'posts_per_page' => 4,
'orderby' => 'rand'
);
$productos = new WP_Query($args); ?>
<?php while($productos->have_posts()): $productos->the_post(); ?>
<div class="cajacatalogo single">
<h2 class="titulo-producto"><?php the_title(); ?></h2>
<span class="estado"><?php the_field('estado'); ?></span>
<div class="imagen-producto">
<?php the_post_thumbnail('catalogo'); ?>
</div>
<span class="origen"><?php the_field('origen'); ?></span>
<div class="precio-catalogo">
<span class="precio"><?php the_field('precio'); ?></span>
</div>
</div>
<?php endwhile; ?>
<?php $url = get_page_by_title('Catálogo'); ?>
<a href="<?php echo get_permalink($url->ID); ?>" class="enlace single">Ver todos los productos</a>
<?php wp_reset_postdata(); ?>
</div>
<?php get_footer(); ?>