Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <div class="banner banner_empresa">
- <img src="<?php bloginfo('stylesheet_directory');?>/img/banners/banner_home.jpg" alt="">
- </div>
- <div class="container">
- <div class="col-sm-12">
- <?php
- $args = array(
- 'category' => '5',
- 'posts_per_page' => 4,
- 'orderby' => 'post_date',
- 'order' => 'DESC',
- 'post_status' => 'publish'
- );
- $temp = $wp_query; // assign orginal query to temp variable for later use
- $wp_query = null;
- $wp_query = new WP_Query($args);
- if( have_posts() ) :
- while ($wp_query->have_posts()) : $wp_query->the_post();
- ?>
- <div class="col-sm-6 list-post-category">
- <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <div class="post-category">
- <p><?php echo wp_trim_words( get_the_content(), 25 ); ?></p>
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( '<i class="fa fa-hand-o-right"></i> Clique aqui e leia mais' ); ?></a>
- </div>
- </div>
- <?php endwhile;
- else :
- echo '<p> Nenhum artigo encontrado </p>';
- endif; ?>
- <?php pagination(); ?>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement