Advertisement
grappler

home-page.php flipped

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