Advertisement
thierry-eamon

featured.php

Oct 19th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. <?php $do_not_duplicate = array();
  2.     $folio_loop = new WP_Query( array
  3.         (
  4.             'featured' => 'featured-post',
  5.             'post_type' => 'projects',
  6.             'posts_per_page' => '1',
  7.             )
  8.         );
  9.  
  10.          while ( $folio_loop->have_posts() ) : $folio_loop->the_post();
  11.         $do_not_duplicate[] = $post->ID; ?>
  12.  
  13.         <div id="featured" style="position: relative;">
  14.            
  15.        
  16.             <div class="featured-overlay" style="position: absolute; right: 20px; bottom: 20px; width: 165px; height: 165px; text-align: center;">
  17.                 <div class="project-meta-featured">
  18.               <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  19.             <span>
  20.             <?php
  21.                 global $post;
  22.                 $text = get_post_meta( $post->ID, '_cmb_project_meta', true );
  23.                 echo $text;
  24.             ?>
  25.             </span>
  26.             <br />
  27.             <?php
  28.                 global $post;
  29.                 $text = get_post_meta( $post->ID, '_cmb_client_meta', true );
  30.                 echo $text;
  31.             ?>
  32.            
  33.            
  34.             </a>
  35.               </div>
  36.             </div>
  37.          
  38.             <?php if ( has_post_thumbnail()) : ?>
  39.                 <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  40.                     <?php the_post_thumbnail('featured'); ?>
  41.                 </a>
  42.             <?php endif; ?>
  43.          
  44.        
  45.            
  46.         </div>
  47.      
  48.     <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement