Skip to content

Commit

Permalink
added Page Template - no more "Updates from xxx" on pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Versluis authored and Jay Versluis committed Nov 22, 2013
1 parent 4c3fe63 commit 09ebafd
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
53 changes: 53 additions & 0 deletions page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
* P2 Categories
* Page Template
* since @1.5
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package P2
*/
?>
<?php get_header(); ?>

<div class="sleeve_main">
<?php if ( p2_user_can_post() && !is_archive() ) : ?>
<?php locate_template( array( 'post-form.php' ), true ); ?>
<?php endif; ?>
<div id="main">
<h2>

<?php echo get_the_title(); ?>

<span class="controls">
<a href="#" id="togglecomments"> <?php _e( 'Toggle Comment Threads', 'p2' ); ?></a> | <a href="#directions" id="directions-keyboard"><?php _e( 'Keyboard Shortcuts', 'p2' ); ?></a>
</span>
</h2>

<ul id="postlist">
<?php if ( have_posts() ) : ?>

<?php while ( have_posts() ) : the_post(); ?>
<?php p2_load_entry(); ?>
<?php endwhile; ?>

<?php else : ?>

<li class="no-posts">
<h3><?php _e( 'No posts yet!', 'p2' ); ?></h3>
</li>

<?php endif; ?>
</ul>

<div class="navigation">
<p class="nav-older"><?php next_posts_link( __( '&larr; Older posts', 'p2' ) ); ?></p>
<p class="nav-newer"><?php previous_posts_link( __( 'Newer posts &rarr;', 'p2' ) ); ?></p>
</div>

</div> <!-- main -->

</div> <!-- sleeve -->

<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Use it to make something cool, have fun, and share what you've learned with othe
margin-top: -35px;
margin-right: 20px;
float: right;
font-size: 1.6em;
font-size: 1.4em;
}
/* give code sections a bit more padding */
pre {
Expand Down

0 comments on commit 09ebafd

Please sign in to comment.