Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Custom Home
- *
- */
- get_header(); // Loads the header.php template. ?>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
- <script type="text/javascript">
- //<![CDATA[
- function ShowHide(){
- $("#comments-template").animate({"height": "toggle"}, { duration: 1000 });
- }
- //]]>
- </script>
- <style media="screen" type="text/css">
- #comments-template {display: none;}
- </style>
- <div id="content" class="hfeed content">
- <?php do_atomic( 'before_content' ); // hybrid_before_content ?>
- <?php
- $args = wp_parse_args( $query_string );
- $paged = isset( $args['paged'] ) ? absint( $args['paged'] ) : 1;
- query_posts( array( 'posts_per_page' => '1', 'paged' => $paged ) );
- ?>
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
- <?php do_atomic( 'before_entry' ); // hybrid_before_entry ?>
- <a onclick="ShowHide(); return false;" href="#">Show/hide comments</a>
- <?php $withcomments = true; ?>
- <?php comments_template(); ?>
- <div class="entry-content">
- <?php the_content( sprintf( __( 'Continue reading %1$s', hybrid_get_textdomain() ), the_title( ' "', '"', false ) ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?>
- </div><!-- .entry-content -->
- <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?>
- </div><!-- .hentry -->
- <?php endwhile; ?>
- <?php do_atomic( 'after_singular' ); // hybrid_after_singular ?>
- <?php else: ?>
- <?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
- <?php endif; ?>
- <?php do_atomic( 'after_content' ); // hybrid_after_content ?>
- </div><!-- .content .hfeed -->
- <?php get_footer(); // Loads the footer.php template. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement