Advertisement
Guest User

Page Code

a guest
Dec 30th, 2010
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.77 KB | None | 0 0
  1.                 <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  2.  
  3.                             <?php
  4.                            
  5.                                 if ($post->post_parent != 0) {
  6.                                    
  7.                                     $parent = $post->post_parent;
  8.                                    
  9.                                     echo ('<h4 style="display:none;"><a href="'. $parent_link .'">' . $parent_title . '</a></h4>'); ?>
  10.                                     <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"></a></h2>
  11.  
  12.  
  13.                             <? } else { ?>
  14.                                
  15.                                
  16.                                 <?php
  17.                                
  18.                                 $header_image =  get_post_meta($post->ID, 'header_image', true);
  19.                                 $header_text =  get_post_meta($post->ID, 'header_text', true);
  20.                                
  21.                                
  22.                                 if ($header_image && $header_text) { ?>
  23.                                     <div style="background-image:url(<? echo $header_image ?>);" id="banner">
  24.                                         <? echo $header_text ?>
  25.                                     </div>
  26.    
  27.                                 <?php } else { ?>
  28.                                    
  29.                                      <h2><?php the_title(); ?></h2>
  30.  
  31.                                 <?php } ?>
  32.  
  33.                             <? } ?>
  34.  
  35.                             <div class="separator"></div>
  36.                            
  37.                             <?php the_content(); ?>
  38.                         <?php endwhile ?>  
  39.                         <?php else : ?>
  40.                    
  41.                             <h2 class="center">Not Found</h2>
  42.                             <p class="center">Sorry, but you are looking for something that isn't here.</p>
  43.                             <?php include (TEMPLATEPATH . '/searchform.php'); ?>   
  44.                    
  45.                         <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement