Advertisement
Guest User

home.php

a guest
Nov 18th, 2012
631
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 - 2012 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. <?php get_sidebar('home'); ?>
  26.  
  27.         <div id="featured" class="grid col-940">
  28.        
  29.         <div class="grid col-460">
  30.  
  31.             <?php $options = get_option('responsive_theme_options');
  32.             // First let's check if headline was set
  33.                 if ($options['home_headline']) {
  34.                     echo '<h1 class="featured-title">';
  35.                     echo $options['home_headline'];
  36.                     echo '</h1>';
  37.             // If not display dummy headline for preview purposes
  38.                   } else {
  39.                     echo '<h1 class="featured-title">';
  40.                     echo __('Hello, World!','responsive');
  41.                     echo '</h1>';
  42.                   }
  43.             ?>
  44.                    
  45.             <?php $options = get_option('responsive_theme_options');
  46.             // First let's check if headline was set
  47.                 if ($options['home_subheadline']) {
  48.                     echo '<h2 class="featured-subtitle">';
  49.                     echo $options['home_subheadline'];
  50.                     echo '</h2>';
  51.             // If not display dummy headline for preview purposes
  52.                   } else {
  53.                     echo '<h2 class="featured-subtitle">';
  54.                     echo __('Your H2 subheadline here','responsive');
  55.                     echo '</h2>';
  56.                   }
  57.             ?>
  58.            
  59.             <?php $options = get_option('responsive_theme_options');
  60.             // First let's check if content is in place
  61.                 if (!empty($options['home_content_area'])) {
  62.                     echo '<p>';
  63.                     echo do_shortcode($options['home_content_area']);
  64.                     echo '</p>';
  65.             // If not let's show dummy content for demo purposes
  66.                   } else {
  67.                     echo '<p>';
  68.                     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');
  69.                     echo '</p>';
  70.                   }
  71.             ?>
  72.            
  73.             <?php $options = get_option('responsive_theme_options'); ?>
  74.             <?php if ($options['cta_button'] == 0): ?>    
  75.             <div class="call-to-action">
  76.  
  77.             <?php $options = get_option('responsive_theme_options');
  78.             // First let's check if headline was set
  79.                 if (!empty($options['cta_url']) && $options['cta_text']) {
  80.                     echo '<a href="'.$options['cta_url'].'" class="blue button">';
  81.                     echo $options['cta_text'];
  82.                     echo '</a>';
  83.             // If not display dummy headline for preview purposes
  84.                   } else {
  85.                     echo '<a href="#nogo" class="blue button">';
  86.                     echo __('Call to Action','responsive');
  87.                     echo '</a>';
  88.                   }
  89.             ?>  
  90.            
  91.             </div><!-- end of .call-to-action -->
  92.             <?php endif; ?>        
  93.            
  94.         </div><!-- end of .col-460 -->
  95.  
  96.         <div id="featured-image" class="grid col-460 fit">
  97.                            
  98.             <?php $options = get_option('responsive_theme_options');
  99.             // First let's check if image was set
  100.                 if (!empty($options['featured_content'])) {
  101.                     echo do_shortcode($options['featured_content']);
  102.             // If not display dummy image for preview purposes
  103.                   } else {            
  104.                     echo '<img class="aligncenter" src="'.get_stylesheet_directory_uri().'/images/featured-image.png" width="440" height="300" alt="" />';
  105.                   }
  106.             ?>
  107.                                    
  108.         </div><!-- end of #featured-image -->
  109.        
  110.         </div><!-- end of #featured -->
  111.                
  112. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement