Advertisement
grappler

home.php full width

Feb 14th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.09 KB | None | 0 0
  1. <?php
  2.  
  3. // Exit if accessed directly
  4. if ( !defined('ABSPATH')) exit;
  5.  
  6. /**
  7.  * Home Page
  8.  *
  9.  * Note: You can overwrite home.php as well as any other Template in Child Theme.
  10.  * Create the same file (name) include in /responsive-child-theme/ and you're all set to go!
  11.  * @see            http://codex.wordpress.org/Child_Themes
  12.  *
  13.  * @file           home.php
  14.  * @package        Responsive
  15.  * @author         Emil Uzelac
  16.  * @copyright      2003 - 2013 ThemeID
  17.  * @license        license.txt
  18.  * @version        Release: 1.0
  19.  * @filesource     wp-content/themes/responsive/home.php
  20.  * @link           http://codex.wordpress.org/Template_Hierarchy
  21.  * @since          available since Release 1.0
  22.  */
  23. ?>
  24. <?php get_header(); ?>
  25.  
  26.         <div id="featured" class="grid col-940">
  27.        
  28.         <div class="grid col-940">
  29.  
  30.             <?php $options = get_option('responsive_theme_options');
  31.             // First let's check if headline was set
  32.                 if ($options['home_headline']) {
  33.                     echo '<h1 class="featured-title">';
  34.                     echo $options['home_headline'];
  35.                     echo '</h1>';
  36.             // If not display dummy headline for preview purposes
  37.                   } else {
  38.                     echo '<h1 class="featured-title">';
  39.                     echo __('Hello, World!','responsive');
  40.                     echo '</h1>';
  41.                   }
  42.             ?>
  43.                    
  44.             <?php $options = get_option('responsive_theme_options');
  45.             // First let's check if headline was set
  46.                 if ($options['home_subheadline']) {
  47.                     echo '<h2 class="featured-subtitle">';
  48.                     echo $options['home_subheadline'];
  49.                     echo '</h2>';
  50.             // If not display dummy headline for preview purposes
  51.                   } else {
  52.                     echo '<h2 class="featured-subtitle">';
  53.                     echo __('Your H2 subheadline here','responsive');
  54.                     echo '</h2>';
  55.                   }
  56.             ?>
  57.            
  58.             <?php $options = get_option('responsive_theme_options');
  59.             // First let's check if content is in place
  60.                 if (!empty($options['home_content_area'])) {
  61.                     echo '<p>';
  62.                     echo do_shortcode($options['home_content_area']);
  63.                     echo '</p>';
  64.             // If not let's show dummy content for demo purposes
  65.                   } else {
  66.                     echo '<p>';
  67.                     echo __('Your title, subtitle and this very content is editable from Theme Option. Call to Action button and its destination link as well. Image on your right can be an image or even YouTube video if you like.','responsive');
  68.                     echo '</p>';
  69.                   }
  70.             ?>
  71.            
  72.             <?php $options = get_option('responsive_theme_options'); ?>
  73.             <?php if ($options['cta_button'] == 0): ?>    
  74.             <div class="call-to-action">
  75.  
  76.             <?php $options = get_option('responsive_theme_options');
  77.             // First let's check if headline was set
  78.                 if (!empty($options['cta_url']) && $options['cta_text']) {
  79.                     echo '<a href="'.$options['cta_url'].'" class="blue button">';
  80.                     echo $options['cta_text'];
  81.                     echo '</a>';
  82.             // If not display dummy headline for preview purposes
  83.                   } else {
  84.                     echo '<a href="#nogo" class="blue button">';
  85.                     echo __('Call to Action','responsive');
  86.                     echo '</a>';
  87.                   }
  88.             ?>  
  89.            
  90.             </div><!-- end of .call-to-action -->
  91.             <?php endif; ?>        
  92.            
  93.         </div><!-- end of .col-460 -->
  94.  
  95.         <div id="featured-image" class="grid col-940 fit">
  96.                            
  97.             <?php $options = get_option('responsive_theme_options');
  98.             // First let's check if image was set
  99.                 if (!empty($options['featured_content'])) {
  100.                     echo do_shortcode($options['featured_content']);
  101.             // If not display dummy image for preview purposes
  102.                   } else {            
  103.                     echo '<img class="aligncenter" src="'.get_stylesheet_directory_uri().'/images/featured-image.png" width="440" height="300" alt="" />';
  104.                   }
  105.             ?>
  106.                                    
  107.         </div><!-- end of #featured-image -->
  108.        
  109.         </div><!-- end of #featured -->
  110.                
  111. <?php get_sidebar('home'); ?>
  112. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement