Advertisement
cosmocanuck

Page Template

Aug 26th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.39 KB | None | 0 0
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) exit;
  3. /**
  4.  * Page Template
  5.  *
  6.  * This template is the default page template. It is used to display content when someone is viewing a
  7.  * singular view of a page ('page' post_type) unless another page template overrules this one.
  8.  * @link http://codex.wordpress.org/Pages
  9.  *
  10.  * @package WooFramework
  11.  * @subpackage Template
  12.  */
  13.     get_header();
  14.     global $woo_options;
  15. ?>
  16.        
  17.     <div id="content" class="page col-full">
  18.    
  19.         <?php woo_main_before(); ?>
  20.        
  21.         <section id="main" class="col-left">           
  22.  
  23.         <?php
  24.             if ( have_posts() ) { $count = 0;
  25.                 while ( have_posts() ) { the_post(); $count++;
  26.         ?>                                                          
  27.             <article <?php post_class(); ?>>
  28.                
  29.                 <header>
  30.                     <h1><?php the_title(); ?></h1>
  31.                 </header>
  32.                
  33.                 <section class="entry">
  34.                
  35. <?php if ( isset($woo_options['woo_contactform_map_coords']) && $woo_options['woo_contactform_map_coords'] != '' ) { $geocoords = $woo_options['woo_contactform_map_coords']; }  else { $geocoords = ''; } ?>
  36.     <?php if ($geocoords != '') { ?>
  37.     <?php woo_maps_contact_output("geocoords=$geocoords"); ?>
  38.     <?php echo do_shortcode( '[hr]' ); ?>
  39. <?php } ?>
  40.                                                
  41.                     <?php the_content(); ?>
  42.  
  43.                     <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); ?>
  44.                 </section><!-- /.entry -->
  45.  
  46.                 <?php edit_post_link( __( '{ Edit }', 'woothemes' ), '<span class="small">', '</span>' ); ?>
  47.                
  48.             </article><!-- /.post -->
  49.            
  50.             <?php
  51.                 // Determine wether or not to display comments here, based on "Theme Options".
  52.                 if ( isset( $woo_options['woo_comments'] ) && in_array( $woo_options['woo_comments'], array( 'page', 'both' ) ) ) {
  53.                     comments_template();
  54.                 }
  55.  
  56.                 } // End WHILE Loop
  57.             } else {
  58.         ?>
  59.             <article <?php post_class(); ?>>
  60.                 <p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
  61.             </article><!-- /.post -->
  62.         <?php } // End IF Statement ?>  
  63.        
  64.         </section><!-- /#main -->
  65.        
  66.         <?php woo_main_after(); ?>
  67.  
  68.         <?php get_sidebar(); ?>
  69.  
  70.     </div><!-- /#content -->
  71.        
  72. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement