Advertisement
Guest User

GALERIA HOME ISOTOPE

a guest
Jan 19th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.42 KB | None | 0 0
  1.     <!-- Content -->
  2.     <div class="container contents listing-grid-layout">
  3.         <div class="row">
  4.             <div class="span12 main-wrap">
  5.  
  6.                 <!-- Main Content -->
  7.                 <div class="main">
  8.  
  9.                     <section class="listing-layout">
  10.  
  11.                         <?php
  12.                         $title_display = get_post_meta( $post->ID, 'REAL_HOMES_page_title_display', true );
  13.                         if( $title_display != 'show' ){
  14.                             ?>
  15.                             <h3 class="title-heading">Imóveis em Destaque</h3>
  16.                             <?php
  17.                         }
  18.                         ?>
  19.  
  20.                         <!-- Gallery Filter -->
  21.                         <div id="filter-by" class="clearfix">
  22.                             <a href="#" data-filter="gallery-item" class="active"><?php _e('All', 'framework'); ?></a><?php
  23.                             $status_terms = get_terms( array( 'taxonomy' => 'property-status', 'exclude' => '71' ) );
  24.                             if ( !empty($status_terms) && is_array($status_terms) )
  25.                             {
  26.                                 foreach ($status_terms as $status_term)
  27.                                 {
  28.                                     echo '<a href="' . get_term_link( $status_term->slug, $status_term->taxonomy ) . '" data-filter="'.$status_term->slug.'" title="' . sprintf(__('View all Properties having %s status', 'framework'), $status_term->name) . '">' . $status_term->name . '</a>';
  29.                                 }
  30.                             }
  31.                             ?>
  32.                         </div>
  33.  
  34.                         <!-- Gallery Container -->
  35.                         <div id="gallery-container">
  36.                             <div class="<?php global $gallery_name; echo esc_attr( $gallery_name ); ?> isotope clearfix">
  37.                                 <?php
  38.                                 // Basic Gallery Query
  39.                                 $query_args = array(
  40.                                     'post_type' => 'property',
  41.                                     'posts_per_page' => -1
  42.                                 );
  43.  
  44.                                 // Gallery Query and Start of Loop
  45.                                 $gallery_query = new WP_Query( $query_args );
  46.                                 while ( $gallery_query->have_posts() ) :
  47.                                     $gallery_query->the_post();
  48.  
  49.                                     // Getting list of property status terms
  50.                                     $term_list = '';
  51.                                     $terms =  get_the_terms( $post->ID, 'property-status' );
  52.                                     if ( !empty($terms) && !is_wp_error( $terms ) ) :
  53.                                         foreach( $terms as $term )
  54.                                         if ($term->slug != 'projeto') {
  55.                                             $term_list .= $term->slug;
  56.                                             $term_list .= ' ';
  57.                                         }    
  58.                                     endif;
  59.  
  60.                                     if(has_post_thumbnail()):
  61.                                         ?>
  62.                                         <div <?php post_class("gallery-item isotope-item $term_list"); ?> >
  63.                                           <article class="property-item clearfix">
  64.                                             <?php
  65.                                             $image_id = get_post_thumbnail_id();
  66.                                             $full_image_url = wp_get_attachment_url($image_id);
  67.                                             global $gallery_image_size;
  68.                                             $featured_image = wp_get_attachment_image_src( $image_id, $gallery_image_size );
  69.                                             ?>
  70.                                             <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
  71.                                            
  72.                                             <figure style="float:left;">
  73.                                 <a href="<?php the_permalink(); ?>">
  74.                                     <?php
  75.                                         global $post;
  76.                                         if( has_post_thumbnail( $post->ID ) ) {
  77.                                         the_post_thumbnail( 'property-thumb-image' );
  78.                                     } else {
  79.                                         inspiry_image_placeholder( 'property-thumb-image' );
  80.                                     }
  81.                                     ?>
  82.                                 </a>
  83.  
  84.                             <?php display_figcaption( $post->ID ); ?>
  85.                                             </figure>
  86.                                            
  87.                                             <div class="detail" style="width:230px;float:left;">
  88.                                                 <h5 class="price">
  89.                                                     <?php
  90.                                                     //preco
  91.                                                     property_price();
  92.                                                    
  93.                                                     //tipo de imovel
  94.                                                     echo inspiry_get_property_types( $post->ID );
  95.                                                     ?>
  96.                                                 </h5>
  97.                                                 <p><?php framework_excerpt(12); ?></p>
  98.                                                 <a class="more-details" href="<?php the_permalink() ?>"><?php _e('More Details ','framework'); ?><i class="fa fa-caret-right"></i></a>
  99.                                             </div>
  100.                                            
  101.                                             <div class="property-meta">
  102.                                                 <?php get_template_part('property-details/property-metas'); ?>
  103.                                             </div>
  104.                                                
  105.                                             <time class="updated hide" datetime="<?php the_modified_time('c'); ?>"><?php the_modified_time('M d, Y'); ?></time>
  106.                                             <span class="vcard hide">
  107.                                                 <?php
  108.                                                 printf( '<a class="url fn" href="%1$s" title="%2$s" rel="author">%3$s</a>',
  109.                                                     esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  110.                                                     esc_attr( sprintf( __( 'View all posts by %s', 'framework' ), get_the_author() ) ),
  111.                                                     get_the_author()
  112.                                                 );
  113.                                                 ?>
  114.                                             </span>
  115.                                           </article>
  116.                                         </div>
  117.                                         <?php
  118.                                     endif;
  119.  
  120.                                 endwhile;
  121.                                 ?>
  122.                             </div>
  123.                         </div>
  124.                         <!-- end of gallery container -->
  125.  
  126.                     </section>
  127.  
  128.                 </div><!-- End Main Content -->
  129.  
  130.             </div> <!-- End span12 -->
  131.  
  132.         </div><!-- End contents row -->
  133.  
  134.     </div><!-- End Content -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement