Advertisement
Guest User

index.php - Updated

a guest
Jan 7th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.41 KB | None | 0 0
  1. <?php
  2. /**
  3. * The main template file.
  4. *
  5. * @package Nu Themes
  6. */
  7.  
  8. get_header(); ?>
  9.                
  10. <div class="add-poll" id="add-poll-id">
  11.         <iframe src="http://pixelstyle.co.uk/outrankd/wp-admin/admin.php?page=wp-polls%2Fpolls-add.php"></iframe>    
  12.     </div>
  13.  
  14.     <div class="row" id="poll-content-wrapper">
  15.         <main id="content" class="col-md-8 col-lg-9 content-area" role="main">
  16.  
  17.             <?php/*
  18.               function isSiteAdmin(h){
  19.    $currentUser = wp_get_current_user();
  20.    return in_array('administrator', $currentUser->roles);
  21. }
  22. */
  23. ?>
  24.              
  25. <?php
  26.         //The Query
  27.         $the_query = new WP_Query( array( 'author' => implode( ",", $friendsIdArray )  ) );
  28.  
  29.     // The Loop
  30.     if ( $the_query->have_posts() ) {
  31.         ?>
  32.         <?php while ( $author_posts->have_posts() ) : $author_posts->the_post() ?>
  33.  
  34.                
  35.                 <div class="col-xs-12 col-sm-6 col-lg-4 masonry-item">
  36.                     <?php get_template_part( 'content', get_post_format() ); ?>
  37.                 </div>
  38.            
  39.            
  40.            
  41. //Display an advert every 2 posts
  42. <?php $postnum++; if($postnum%2 == 0) { ?>
  43.                 <div class="col-xs-12 col-sm-6 col-lg-4 masonry-item">
  44.                    
  45.                                     <article class="box post type-post status-publish format-standard hentry category-uncategorized">
  46.  
  47.                                         <header class="entry-header">
  48.                                             <h2 class="entry-title">Advert Here</h2>
  49.                                         </header>
  50.  
  51.                                         <hr>
  52.  
  53.                                         <div class="clearfix entry-summary">
  54.                                             <p>advert content here</p>
  55.                                         <!-- .entry-summary --></div>
  56.  
  57.                                         <footer class="entry-meta entry-footer">
  58.                                             Report this ad
  59.                                         </footer>
  60.                                     </article>             
  61.                                 </div>
  62. <?php } ?>
  63.  
  64.  
  65.  
  66.            
  67. <?php endwhile; ?>
  68.             <!-- #masonry --></div>
  69.  
  70.             <?php nuthemes_content_nav( 'nav-below' ); ?>
  71.  
  72.         <?php else : ?>
  73.  
  74.             <?php get_template_part( 'no-results', 'index' ); ?>
  75.  
  76.         <?php endif; ?>
  77. wp_reset_postdata();
  78.  
  79.         <!-- #content --></main>
  80.  
  81.         <?php //get_sidebar(); ?>
  82.     <!-- .row --></div>
  83.  
  84.  
  85. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement