Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 2.50 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3.         Template Name: Index
  4. */
  5. ?>
  6.  
  7. <?php
  8. get_header();
  9. ?>
  10.        
  11.         <div id="content-container">
  12.                 <div id="main-content">
  13.                         <div id="banner">
  14.                                 <img src="<?PHP bloginfo('template_directory'); ?>/images/banner01.jpg" alt="Summit North West" />
  15.                                 <img src="<?PHP bloginfo('template_directory'); ?>/images/banner02.jpg" alt="Summit North West" />
  16.                         </div>
  17.                         <div id="content">
  18.                                 <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  19.                
  20.                 <?php if ($post->post_parent != 0) {                
  21.                                         $parent = $post->post_parent;
  22.                                         $parent_title = get_the_title($parent);
  23.                                         $parent_link = get_permalink($parent);
  24.                 ?>
  25.                
  26.                 <h1><?php the_title(); ?></h1>
  27.                
  28.                 <div id="breadcrumbs">
  29.                                         <?php if (class_exists('breadcrumb_navigation_xt')) {
  30.                                                 // New breadcrumb object
  31.                                                 $mybreadcrumb = new breadcrumb_navigation_xt;
  32.                                                 // Options for breadcrumb_navigation_xt
  33.                                                 $mybreadcrumb->opt['title_blog'] = 'Home';
  34.                                                 $mybreadcrumb->opt['separator'] = ' &#187; ';
  35.                                                 $mybreadcrumb->opt['singleblogpost_category_display'] = true;
  36.                                                 // Display the breadcrumb
  37.                                                 $mybreadcrumb->display();
  38.                                         } ?>
  39.                 </div> <!-- [breadcrumb] -->                
  40.                
  41.                 <? } else { ?>
  42.                
  43.                 <?php $header_image =  get_post_meta($post->ID, 'header_image', true);
  44.                    $header_text =  get_post_meta($post->ID, 'header_text', true);
  45.                    if ($header_image && $header_text) { ?>
  46.                
  47.                    <div style="background-image:url(<? echo $header_image ?>);" class="header_image">
  48.                
  49.                    <? echo $header_text ?>
  50.                
  51.                     </div>
  52.                
  53.                 <?php } else { ?>
  54.                
  55.                 <h1 class="short"><?php the_title(); ?></h1>
  56.                
  57.                 <?php } ?>
  58.                
  59.                 <? } ?>
  60.                
  61.                 <?php the_content(); ?>
  62.                 <?php endwhile ?>      
  63.                 <?php else : ?>
  64.                
  65.                 <h1>Not Found</h1>
  66.                
  67.                 <p>Sorry, but the page you are looking for cannot be found.</p>
  68.                
  69.                 <?php endif; ?>
  70.                         </div>
  71.                 </div>
  72.                 <?php get_sidebar(); ?>
  73.  
  74.         </div><!-- end of content container -->
  75. </div><!-- end of container -->
  76.  
  77. <?php get_footer(); ?>