Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template file to show the front page display.
- *
- * @package ThemeGrill
- * @subpackage Radiate
- * @since Radiate 1.0
- */
- get_header(); ?>
- '<?php
- $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' ) );
- $get_featured_pages = new WP_Query( array(
- 'posts_per_page' => 24,
- 'post_type' => array( 'page' ),
- 'post__in' => $page_array,
- 'orderby' => 'post__in',
- 'ignore_sticky_posts' => 1
- ));
- ?>
- <div id="featured_pages" class="clearfix">
- <?php
- $j = 1;
- while ( $get_featured_pages->have_posts() ) :
- $get_featured_pages->the_post();
- if( $j % 3 == 0 && $j > 1 ) { $page_class = "tg-one-third tg-one-third-last"; }
- else { $page_class = "tg-one-third"; }
- ?>'
- <div class="<?php echo $page_class; ?>">
- <div class="page_text_container">
- <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
- <h1 class="entry-title"><a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- <?php the_excerpt(); ?><a class="more-link" title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php _e( 'Read more','radiate' ); ?></a>
- </div>
- </div>
- <?php
- if( $page_class == "tg-one-third tg-one-third-last" ) echo '<div style="clear:both;"></div>';
- $j++;
- endwhile;
- wp_reset_postdata();
- ?>
- </div>
- <div id="primary" class="content-area">
- <main id="main" class="site-main" role="main">
- <?php if ( have_posts() ) : ?>
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php
- /* Include the Post-Format-specific template for the content.
- * If you want to override this in a child theme, then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
- ?>
- <?php endwhile; ?>
- <?php radiate_paging_nav(); ?>
- <?php else : ?>
- <?php get_template_part( 'content', 'none' ); ?>
- <?php endif; ?>
- </main><!-- #main -->
- </div><!-- #primary -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment