SHARE
TWEET

Untitled

Dikac Jun 23rd, 2012 298 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   <div id="box-posts">
  2.  
  3.        <div class="call"><span class="title">ARTIGOS</span><a href="<?php echo home_url(); ?>/artigos" >Ver todos os artigos &raquo;</a></div>
  4.        <?php
  5.        $destaque = get_term_by('slug', 'destaque', 'post_tag');
  6.        $video = get_term_by('slug', 'video', 'post_tag');
  7.  
  8.        $paged=get_query_var('page')?get_query_var('page'):1;
  9.        $recent_query = new WP_Query('tag=destaque&posts_per_page=5');
  10.  
  11.        $recent_query = new WP_Query (array('tag__not_in' => array($destaque->term_id, $video->term_id), 'posts_per_page' => 5, 'paged' =>$paged));
  12.        while ($recent_query->have_posts()) : $recent_query->the_post(); ?>
  13.  
  14.        <span class="box-excerpt" id="post-<?php the_ID(); ?>">
  15.        <h3 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  16.  
  17.        <?php  if(has_post_thumbnail()) { echo '<a href="'.get_permalink().'"><span class="box-thumb" style="background: url(\'';$image_id = get_post_thumbnail_id();$image_url = wp_get_attachment_image_src($image_id); echo $image_url[0].'\') no-repeat center center; background-size: 100% auto"></span></a>';} ?>
  18.        <?php echo limit_chars(get_the_content(),'150'); ?>
  19.        <a href="<?php the_permalink(); ?>">mais &raquo;</a>
  20.        <p class="mini-meta"><?php echo strip_tags(get_the_category_list( ', ' ));?> - por <?php printf( _x( '%s', '', 'buddypress' ), str_replace( '<a href=', '<a rel="author" href=', bp_core_get_userlink( $post->post_author ) ) ); ?> | <?php echo human_time_diff(get_the_time('U')) . ' atr&aacute;s'; ?></p>
  21.        <span class="sep"></span>
  22.        </span>
  23.  
  24.        <?php endwhile; wp_pagenavi( array( 'query' => $recent_query ) ); wp_reset_postdata();?>
  25.   </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top