Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

blank page template 2011

By: alchymyth on Jul 24th, 2012  |  syntax: PHP  |  size: 2.71 KB  |  views: 893  |  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: Blank Page Template
  4.  *
  5.  * @package WordPress
  6.  * @subpackage Twenty_Eleven
  7.  */ ?>
  8. <?php // essential code from header.php ?>
  9. <?php
  10. /**
  11.  * The Header for our theme.
  12.  *
  13.  * Displays all of the <head> section and everything up till <div id="main">
  14.  *
  15.  * @package WordPress
  16.  * @subpackage Twenty_Eleven
  17.  * @since Twenty Eleven 1.0
  18.  */
  19. ?><!DOCTYPE html>
  20. <!--[if IE 6]>
  21. <html id="ie6" <?php language_attributes(); ?>>
  22. <![endif]-->
  23. <!--[if IE 7]>
  24. <html id="ie7" <?php language_attributes(); ?>>
  25. <![endif]-->
  26. <!--[if IE 8]>
  27. <html id="ie8" <?php language_attributes(); ?>>
  28. <![endif]-->
  29. <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
  30. <html <?php language_attributes(); ?>>
  31. <!--<![endif]-->
  32. <head>
  33. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  34. <meta name="viewport" content="width=device-width" />
  35. <title><?php
  36.         /*
  37.          * Print the <title> tag based on what is being viewed.
  38.          */
  39.         global $page, $paged;
  40.  
  41.         wp_title( '|', true, 'right' );
  42.  
  43.         // Add the blog name.
  44.         bloginfo( 'name' );
  45.  
  46.         // Add the blog description for the home/front page.
  47.         $site_description = get_bloginfo( 'description', 'display' );
  48.         if ( $site_description && ( is_home() || is_front_page() ) )
  49.                 echo " | $site_description";
  50.  
  51.         // Add a page number if necessary:
  52.         if ( $paged >= 2 || $page >= 2 )
  53.                 echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
  54.  
  55.         ?></title>
  56. <link rel="profile" href="http://gmpg.org/xfn/11" />
  57. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  58. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  59. <!--[if lt IE 9]>
  60. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  61. <![endif]-->
  62. <?php
  63.         if ( is_singular() && get_option( 'thread_comments' ) )
  64.                 wp_enqueue_script( 'comment-reply' );
  65.         wp_head();
  66. ?>
  67. </head>
  68.  
  69. <body <?php body_class(); ?>>
  70. <div id="page" class="hfeed blank-page">
  71.         <div id="main">
  72.  
  73. <?php //end of essential header.php code ?>
  74.  
  75. <?php //essential code of page.php ?>
  76.  
  77.                 <div id="primary">
  78.                         <div id="content" role="main">
  79.  
  80.                                 <?php while ( have_posts() ) : the_post(); ?>
  81.  
  82.                                         <?php get_template_part( 'content', 'page' ); ?>
  83.  
  84.                                         <?php comments_template( '', true ); ?>
  85.  
  86.                                 <?php endwhile; // end of the loop. ?>
  87.  
  88.                         </div><!-- #content -->
  89.                 </div><!-- #primary -->
  90.  
  91. <?php //end of essential code of page.php ?>
  92.  
  93. <?php //essential code of footer.php ?>
  94.         </div><!-- #main -->
  95.  
  96. <div style="clear:both;float:none;"></div>
  97. <?php //to clear the floats and stretch the #page background to the bottom/// ?>
  98.  
  99. </div><!-- #page -->
  100.  
  101. <?php wp_footer(); ?>
  102.  
  103. </body>
  104. </html>
  105. <?php //end of essential code of footer.php ?>