Advertisement
darrenbachan

Untitled

Jun 2nd, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.79 KB | None | 0 0
  1. <?php set_query_var('posts_per_page', 12) ?>
  2.  
  3. <?php get_header(); ?>
  4.  
  5. <?php $user_id = get_query_var( 'author' ) ?>
  6.  
  7.     <?php get_template_part('content', 'featured-banner'); ?>
  8.  
  9.         <div class="blog-post-featured-banner">
  10.             <?php if(!empty($clan_member_info->cover_photo)) echo '<img src="'.$clan_member_info->cover_photo.'"/>'; ?>
  11.  
  12.             <div class="texture-container bottom">
  13.                 <div class="texture texture-white-bottom"></div>
  14.             </div>
  15.         </div>
  16.  
  17.     <div class="container">
  18.         <section>
  19.             <div class="row">
  20.                 <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
  21.                
  22.                 <article>
  23.                     <div class="page-header">
  24.                         <h2><?php $user->first_name; ?></h2>
  25.                     </div>  
  26.                    
  27.                         <div class="row">
  28.                        
  29.                             <article class="roster-list">
  30.                                                        
  31.                                 <?php $clan_member_info = get_userdata($user_id); ?>
  32.                                 <?php $avatar = get_avatar( $user_id, 250 ); ?>
  33.                                                        
  34.                                 <?php
  35.                                     $user_fields = get_field_objects('user_'.$user_id);
  36.                                    
  37.                                     usort($user_fields , function($a, $b) {
  38.                                         return $a['order_no'] - $b['order_no'];
  39.                                     });
  40.                                                                            
  41.                                     if($user_fields) {
  42.                                         echo '<ul class="syau-platform">';
  43.                                             foreach($user_fields as $user_field) {
  44.                                                 if(!empty($user_field['value'])) {
  45.                                                     echo '<li class="'.$user_field['name'].'">';
  46.                                                     echo $user_field['label'].': '.$user_field['value'];
  47.                                                     echo '</li>';
  48.                                                 }
  49.                                             }
  50.                                         echo '</ul>';
  51.                                     }
  52.  
  53.                                 ?>
  54.                                                                                                                            
  55.                                 <div class="clan-member col-md-4">
  56.                                    
  57.                                     <?php echo $avatar; ?>
  58.                                    
  59.                                     <p class="syau-name">
  60.                                         <?php echo $clan_member_info->first_name; ?> <?php echo $clan_member_info->last_name; ?>
  61.                                     </p>
  62.  
  63.                                     <div class="syau-description">
  64.                                         <?php if(!empty($clan_member_info->description)) echo '<p>'.$clan_member_info->description.'</p>'; ?>
  65.                                     </div>
  66.  
  67.                                     <div class="blog-post-featured-banner">
  68.                                         <?php echo '<img src="'.$clan_member_info->cover_photo.'"/>'; ?>
  69.                                         <?php echo $clan_member_info->cover_photo; ?>
  70.  
  71.                                         <div class="texture-container bottom">
  72.                                             <div class="texture texture-white-bottom"></div>
  73.                                         </div>
  74.                                     </div>
  75.                                    
  76.                                     <ul class="syau-platform">
  77.                                         <?php if(!empty($clan_member_info->psn_id)) echo '<li>'.$user_field['label'].' : '.$clan_member_info->psn_id.'</li>'; ?>
  78.                                         <?php if(!empty($clan_member_info->xbox_one_gamertag)) echo '<li>'.$clan_member_info->xbox_one_gamertag.'</li>'; ?>
  79.                                         <?php if(!empty($clan_member_info->wii_u_id)) echo '<li>'.$clan_member_info->wii_u_id.'</li>'; ?>
  80.                                         <?php if(!empty($clan_member_info->steam_username)) echo '<li>'.$clan_member_info->steam_username.'</li>'; ?>
  81.                                         <?php if(!empty($clan_member_info->battle_net_username)) echo '<li>'.$clan_member_info->battle_net_username.'</li>'; ?>
  82.                                         <?php if(!empty($clan_member_info->facebook_url)) echo '<li>'.$clan_member_info->$user_field['label'].$clan_member_info->facebook_url.'</li>'; ?>
  83.                                     </ul>
  84.                                    
  85.                                     <div class="syau-description">
  86.                                         <?php echo apply_filters('the_content', $clan_member_info->description); ?>
  87.                                     </div>
  88.                                    
  89.                                 </div>
  90.                                    
  91.                                
  92.                             </article>
  93.                         </div>
  94.                        
  95.                     <?php the_content(); ?>
  96.    
  97.                 </article>
  98.                
  99.                 <?php
  100.                     $args = array(
  101.                         'order' => DESC,
  102.                         'orderby' => 'date',
  103.                         'posts_per_page'=>3,
  104.                         'post_type' => 'post',
  105.                         'caller_get_posts'=>1
  106.                     );
  107.                
  108.                     $my_query = new WP_Query($args);
  109.                 ?>
  110.  
  111.                 <?php if($my_query->have_posts()) : while($my_query->have_posts()) : $my_query->the_post(); ?>
  112.                
  113.                     <div class="col-md-4">
  114.                         <div class="recent-blog-post-item">
  115.                             <?php if(has_post_thumbnail()) : ?>
  116.                                 <div class="blog-post-featured-img">
  117.                                     <a href="<?php the_permalink(); ?>">
  118.                                         <?php the_post_thumbnail(); ?>
  119.                                     </a>
  120.                                 </div>
  121.                             <?php endif; ?>
  122.                            
  123.                             <div class="blog-post-content recent-meta-text">
  124.                                 <div class="recent-meta-title">
  125.                                     <a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>">
  126.                                         <h4><?php the_title(); ?></h4>
  127.                                     </a>
  128.                                 </div>
  129.  
  130.                                 <div class="recent-meta-excerpt">
  131.                                     <?php the_excerpt(); ?>
  132.                                 </div>
  133.                             </div> <!-- end recent meta text -->  
  134.                         </div><!-- end recent blog post item -->
  135.                     </div>
  136.                
  137.                 <?php endwhile; else : endif; ?>
  138.  
  139.                 <?php the_posts_pagination( array(
  140.                     'mid_size' => 2,
  141.                     'prev_text' => __( 'Previous Page', 'textdomain' ),
  142.                     'next_text' => __( 'Next Page', 'textdomain' ),
  143.                     'screen_reader_text' => ( '' )
  144.                 ) ); ?>
  145.  
  146.                 </div><!-- end column -->
  147.             </div><!--end row-->
  148.         </section>
  149.     </div><!--end container-->
  150.    
  151. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement