Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul id="noticias">
- <?php $contador = 0; global $post; $args = array( 'numberposts' => 3, 'cat' => 53, 'offset' => 0 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?>
- <li>
- <?php if ( get_field('arquivo_download') ) { ?><a href="<?php echo get_field('arquivo_download'); ?>" target="_blank">
- <?php } if ( get_field('link_redirecionar') ) { ?><a href="<?php echo get_field('link_redirecionar'); ?>">
- <?php } else { ?><a href="<?php the_permalink() ?>"><?php } ?>
- <?php if ($contador == 0) {?>
- <figure><?php get_the_image( array( 'meta_key' => 'thumbnail', 'size' => 'full') ); ?></figure>
- <figcaption><?php the_title(); ?></figcaption>
- <?php } else {?>
- <?php the_title(); ?>
- <p style="font-size: 10px; line-height: 1.1rem;"><?php the_excerpt();?></p>
- <?php } $contador++;?>
- </a>
- </li>
- <?php endforeach; ?><?php wp_reset_query(); ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement