Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package WordPress
- * @subpackage BigAssMonsters
- */
- get_header(); ?>
- <div id="feature">
- <div id="slider">
- <!-- element with overflow applied -->
- <div class="scroll">
- <!-- the element that will be scrolled during the effect -->
- <div class="scrollContainer">
- <!-- our individual panels -->
- <?php
- $do_not_duplicate = array();
- $featured_query = new WP_Query('showposts=4&cat=1');
- while ($featured_query->have_posts()) : $featured_query->the_post();
- $do_not_duplicate[] = get_the_ID();
- ?>
- <?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class('panel'); ?> style="background-image:url('<?php echo $url ?>')">
- <header class="entry-header">
- <h2><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </article>
- <?php endwhile; ?>
- </div>
- </div>
- <nav>
- <ul>
- <?php
- $postcount = 0;
- $featured_query = new WP_Query('showposts=4&cat=1');
- while ($featured_query->have_posts()) : $featured_query->the_post();
- $do_not_duplicate[] = get_the_ID();
- $postcount++;
- ?>
- <?php if( $postcount == 1 ) : ?>
- <li><a href="#post-<?php the_ID(); ?>" <?php post_class('selected');?>><?php if (strlen($post->post_title) > 30) { echo substr(the_title($before = '', $after = '', FALSE), 0, 30) . '...'; } else { the_title();} ?></a></li>
- <?php else : ?>
- <li><a href="#post-<?php the_ID(); ?>" <?php post_class();?>><?php if (strlen($post->post_title) > 30) { echo substr(the_title($before = '', $after = '', FALSE), 0, 30) . '...'; } else { the_title();} ?></a></li>
- <?php endif; ?>
- <?php endwhile; ?>
- </ul>
- </nav>
- </div>
- </div>
- <div id="recent-posts">
- <?php
- $args=array(
- 'posts_per_page' => 5,
- 'post__not_in' => array_merge($do_not_duplicate, get_option( 'sticky_posts' )),
- );
- $featured_query = new WP_Query($args);
- while ($featured_query->have_posts()) : $featured_query->the_post();
- $do_not_duplicate[] = $post->ID; ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(''); ?>>
- <div class="entry-date">
- <p><?php the_time('j'); ?></p>
- <span><?php the_time('F'); ?></span>
- </div>
- <div class="entry">
- <h3><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title(); ?></a></h3>
- <?php the_content(); ?>
- </div>
- </article>
- <?php endwhile; ?>
- </div>
- <?php get_sidebar(); ?>
- </div> <!--/content-->
- </div> <!--/container-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement