Guest User

Untitled

a guest
Jul 22nd, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.93 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template file to show the front page display.
  4.  *
  5.  * @package ThemeGrill
  6.  * @subpackage Radiate
  7.  * @since Radiate 1.0
  8.  */
  9.  
  10. get_header(); ?>
  11.  
  12. '<?php
  13.  $page_array = array( get_theme_mod( 'page-setting-1' ), get_theme_mod( 'page-setting-2' ), get_theme_mod( 'page-setting-3' ), get_theme_mod( 'page-setting-4' ), get_theme_mod( 'page-setting-5' ), get_theme_mod( 'page-setting-6' ), get_theme_mod( 'page-setting-7' ), get_theme_mod( 'page-setting-8' ), get_theme_mod( 'page-setting-9' ), get_theme_mod( 'page-setting-10' ), get_theme_mod( 'page-setting-11' ), get_theme_mod( 'page-setting-12' ), get_theme_mod( 'page-setting-13' ), get_theme_mod( 'page-setting-14' ), get_theme_mod( 'page-setting-15' ), get_theme_mod( 'page-setting-16' ), get_theme_mod( 'page-setting-17' ), get_theme_mod( 'page-setting-18' ), get_theme_mod( 'page-setting-19' ), get_theme_mod( 'page-setting-20' ), get_theme_mod( 'page-setting-21' ), get_theme_mod( 'page-setting-22' ), get_theme_mod( 'page-setting-23' ), get_theme_mod( 'page-setting-24' ) );
  14.  $get_featured_pages = new WP_Query( array(
  15.  'posts_per_page' => 24,
  16.  'post_type' => array( 'page' ),
  17.  'post__in' => $page_array,
  18.  'orderby' => 'post__in',
  19.  'ignore_sticky_posts' => 1
  20.  ));
  21.  ?>
  22.     <div id="featured_pages" class="clearfix">
  23. <?php
  24.  $j = 1;
  25.  while ( $get_featured_pages->have_posts() ) :
  26.  $get_featured_pages->the_post();
  27.  if( $j % 3 == 0 && $j > 1 ) { $page_class = "tg-one-third tg-one-third-last"; }
  28.  else { $page_class = "tg-one-third"; }
  29.  ?>'
  30.             <div class="<?php echo $page_class; ?>">               
  31.                 <div class="page_text_container">
  32.                     <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
  33.                     <h1 class="entry-title"><a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  34.                     <?php the_excerpt(); ?><a class="more-link" title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php _e( 'Read more','radiate' ); ?></a>
  35.                 </div>                 
  36.             </div>
  37.             <?php
  38.             if( $page_class == "tg-one-third tg-one-third-last" ) echo '<div style="clear:both;"></div>';
  39.             $j++;
  40.         endwhile;
  41.         wp_reset_postdata();
  42.         ?>
  43.     </div>
  44.  
  45.     <div id="primary" class="content-area">
  46.         <main id="main" class="site-main" role="main">
  47.  
  48.         <?php if ( have_posts() ) : ?>
  49.  
  50.             <?php /* Start the Loop */ ?>
  51.             <?php while ( have_posts() ) : the_post(); ?>
  52.  
  53.                 <?php
  54.                     /* Include the Post-Format-specific template for the content.
  55.                      * If you want to override this in a child theme, then include a file
  56.                      * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  57.                      */
  58.                     get_template_part( 'content', get_post_format() );
  59.                 ?>
  60.  
  61.             <?php endwhile; ?>
  62.  
  63.             <?php radiate_paging_nav(); ?>
  64.  
  65.         <?php else : ?>
  66.  
  67.             <?php get_template_part( 'content', 'none' ); ?>
  68.  
  69.         <?php endif; ?>
  70.  
  71.         </main><!-- #main -->
  72.     </div><!-- #primary -->
  73.  
  74. <?php get_sidebar(); ?>
  75. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment