Advertisement
Guest User

Untitled

a guest
May 16th, 2012
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.17 KB | None | 0 0
  1.     <?php get_header();?>
  2.     <?php get_sidebar(); ?>
  3.  
  4.     <?php
  5.  
  6.     $term=get_term_by('slug',get_query_var( 'term' ),get_query_var('taxonomy'));
  7.     $pagevar='?page=';
  8.     $paged=get_query_var('page')?get_query_var('page'):1;
  9.  
  10.     //Estas informacoes permitem mostrar posts no formato de qualquer template na pasta templates
  11.     $grid_template='grid-3';    //procure por "block entry item grid-" no arquivo de template que quer usar
  12.     $nome_tamanho = '333x333';  // nome tamanho criado pelo plugin ou por chamada add_image_size
  13.     $qntposts = '-1';           // no. de posts para carregar
  14.  
  15.     ;?>
  16.  
  17.     <div id="right" class="t-portfolio">
  18.  
  19.     <div id="content">
  20.     <div id="content-inner">
  21.     <div id="content-pad">
  22.  
  23.     <div class="grid-4">
  24.     <?php global $wp_query; $curauth = $wp_query->get_queried_object();?>
  25.     <h2><?php echo $curauth->display_name; ?></h2>
  26.     </div>
  27.  
  28.     <div class="clear"></div>
  29.     <?php if ($term->description): ?>
  30.     <section class="description">
  31.     <p><?php echo $term->description; ?></p>
  32.     </section>
  33.  
  34.     <?php endif; ?>
  35.     <div id="masonry">
  36.  
  37.     <?php $my_query = new WP_Query('post_type=portfolio&portfolio_tags='. $term->slug.'&paged='.$paged.'&posts_per_page='.$qntposts);
  38.           while ($my_query->have_posts()) : $my_query->the_post(); ?>
  39.  
  40.     <article class="block entry item <?php echo $grid_template; ?> clearfix prettyPhoto" id="item-<?php the_ID(); ?>">
  41.     <div class="item-img">
  42.     <a href="<?php $imageArray = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),'' );$imageURL = $imageArray[0];echo $imageArray[0] ; ?>" title="<?php the_title(); ?>" rel="prettyPhoto[pp_gal]"><?php  if(has_post_thumbnail()) { echo get_the_post_thumbnail($post_id,$nome_tamanho);} ?><span class="icon"></span></a>
  43.     <a class="item-title" href="<?php $imageArray = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),'' ); $imageURL = $imageArray[0];echo $imageArray[0] ; ?>" title="<?php the_title(); ?>" rel="prettyPhoto[pp_gal]"><span><?php the_title(); ?></span></a>
  44.     </div>
  45.  
  46.     <ul class="entry-meta clearfix">
  47.     <li class="time"><i class="icon"></i><?php the_time('d/m/Y'); ?></li>
  48.     </ul>
  49.  
  50.    
  51.     <ul class="entry-meta clearfix" style="margin:-30px 0 0 0">
  52.     <?php  /* LISTA CATEGORIAS*/ $cats_list = get_the_term_list( $post->ID, 'portfolio_category', '', ', ', '' );
  53.     if ( $cats_list ): ?>
  54.     <li class="category" style="margin:0 0 0px 0"><i class="icon"></i><?php echo $cats_list;?></li>
  55.     <?php endif; ?>
  56.     <!--<li class="like-count"><a id="like-<?php the_ID(); ?>" href="#" <?php bandit::liked_class(); ?>>
  57.     <i class="icon"></i><?php bandit::post_liked_count(); ?></a>
  58.     </li> -->
  59.     <!--<li class="comment-count"><a href="<?php comments_link(); ?>"><i class="icon"></i> <?php comments_number('0','1','%'); ?> </a></li> -->
  60.     </ul>
  61.    
  62.     <ul class="entry-meta clearfix" style="margin:-30px 0 0 0">
  63.     <li class="author" style="float:left;font-weight:bold;margin:0 0 0 0;"><i class="icon"></i><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author"><?php printf( __( '%s', 'creatic' ), get_the_author() ); ?></a></li>
  64.     <?php  /* LISTA TAGS*/ $tags_list = get_the_term_list( $post->ID, 'portfolio_category', '', ', ', '' );
  65.     if ( $tags_list ): ?>
  66.     <!--<li class="tags" style="clear:both;margin:10px 0 0 0;float:left;padding:0"><i class="icon"></i><?php echo $tags_list;?></li> -->
  67.     <?php endif; ?>
  68.     </ul>
  69.  
  70.     </article>
  71.  
  72.     <?php endwhile; ?>
  73.  
  74.     </div><!--end masonry-->
  75.  
  76.     <div class="clear"></div>
  77.     </div><!--end content-pad-->
  78.  
  79.     <div class="clear"></div>
  80.  
  81.     <?php if ($wp_query->max_num_pages > 1 && 1==$paged && $qntposts !='-1' ) : ?>
  82.  
  83.     <nav class="entry-nav clearfix" style="margin: 0 0 0 -10px">
  84.     <p><a id="entry-load-more-link" data-empty="No more items available." data-max="<?php echo $my_query->max_num_pages; ?>" data-src="<?php echo get_term_link($term).$pagevar; ?>" href="#"><?php bandit::lang('post_nav_ajax',__('Load More','creatic')); ?></a></p>
  85.     </nav>
  86.  
  87.     <?php endif; ?>
  88.  
  89.     <?php if(bandit::get_option('footer_widgets_portfolio')) { get_template_part('footer-widgets'); } // footer-widgets.php ?>
  90.     </div><!--end content-inner-->
  91.     <div class="clear"></div>
  92.     </div><!--end content-->
  93.  
  94.     </div><!--end right-->
  95.  
  96.     <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement