Advertisement
catchmahesh

Rock Star Pro index.php

Feb 28th, 2019
205
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.   * Display Featured Image in Only Blog Page and not front page
  4.   */
  5.  
  6. /**
  7.  * The main template file.
  8.  *
  9.  * This is the most generic template file in a WordPress theme
  10.  * and one of the two required files for a theme (the other being style.css).
  11.  * It is used to display a page when nothing more specific matches a query.
  12.  * E.g., it puts together the home page when no home.php file exists.
  13.  *
  14.  * @package Catch Themes
  15.  * @subpackage Rock Star Pro
  16.  * @since Rock Star 1.0
  17.  */
  18.  
  19. get_header();
  20. ?>
  21.     <?php if ( is_home() && ! is_front_page() ) : ?>
  22.         <div class="featured-image-full-width">
  23.             <?php echo get_the_post_thumbnail( get_option( 'page_for_posts' ),'full' );  ?>
  24.         </div>
  25.     <?php endif; ?>
  26.     <?php if ( have_posts() ) : ?>
  27.  
  28.         <?php
  29.         $rock_star_options = rock_star_get_theme_options();
  30.  
  31.         if ( '' != $rock_star_options['latest_posts_title'] ) {
  32.         ?>
  33.             <header class="page-header">
  34.                 <h2 class="section-title">
  35.                     <?php echo $rock_star_options['latest_posts_title']; ?>
  36.                 </h2>
  37.             </header>
  38.         <?php
  39.         } //end if
  40.         ?>
  41.  
  42.         <div id="archive-blog-wrapper" class="archive-blog-wrapper <?php rock_star_archive_content_classes(); ?>">
  43.             <?php while ( have_posts() ) : the_post(); ?>
  44.  
  45.                 <?php
  46.                     /* Include the Post-Format-specific template for the content.
  47.                      * If you want to override this in a child theme then include a file
  48.                      * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  49.                      */
  50.                     get_template_part( 'content', get_post_format() );
  51.                 ?>
  52.  
  53.             <?php endwhile; ?>
  54.         </div><!-- archive-blog-wrapper -->
  55.  
  56.         <?php rock_star_content_nav( 'nav-below' ); ?>
  57.  
  58.     <?php else : ?>
  59.  
  60.         <?php get_template_part( 'no-results', 'index' ); ?>
  61.  
  62.     <?php endif; ?>
  63.  
  64. <?php
  65.  
  66. get_sidebar();
  67.  
  68. get_footer();
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement