Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section class="notices">
- <section class="title">
- <h1>Notícias e <strong>Inovações</strong></h1>
- </section>
- <?php $notices = new WP_Query('cat=17&posts_per_page=3');?>
- <?php $i = 0;if ($notices->have_posts()) :?>
- <?php while ($notices->have_posts()) : the_post(); ?>
- <?php
- $class = $i == 1 ? 'full' : 'col';
- ?>
- <article class="<?= $class;?>">
- <img src="<?= wp_get_attachment_url( get_post_thumbnail_id($post->ID) );?>" width="100%" alt="">
- <section class="description">
- <h1><?php the_title();?></h1>
- </section>
- </article>
- <?php $i++;endwhile;?>
- <?php endif;
- wp_reset_query();
- ?>
- <a href="<?php echo get_category_link(17);?>" class="viewMore">Ver todas as notícias</a>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement