-
Notifications
You must be signed in to change notification settings - Fork 23
/
front-page.php
46 lines (40 loc) · 1.22 KB
/
front-page.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
<?php get_header();?>
<main class="container my-5">
<h1 class="text-center ">
<?php the_title();?>
</h1>
<?php if(have_posts()){
while(have_posts()){ the_post();
the_content();
}
}?>
<div class="lista-productos my-5">
<h2 class='text-center'>PRODUCTOS</h2>
<div class="row">
<?php
$args = array(
'post_type' => 'producto',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'title',
);
$productos = new WP_Query($args);
if($productos->have_posts()){
while($productos->have_posts()){ $productos->the_post();?>
<div class="col-md-4 col-12 my-3">
<figure>
<?php the_post_thumbnail('large'); ?>
</figure>
<h4 class='my-2'>
<a href="<?php the_permalink();?>">
<?php the_title(); ?>
</a>
</h4>
</div>
<?php }
}
?>
</div>
</div>
</main>
<?php get_footer();?>