Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: PageOfPosts
- Modified for iNove Theme in WP 2.8 by Robert Savage.
- */
- wp_enqueue_script( 'jquery' );
- get_header();
- $options = get_option('inove_options');
- if (function_exists('wp_list_comments'))
- {
- add_filter('get_comments_number', 'comment_count', 0);
- }
- // if this is a certain page ID, then set the category to a specific category id.
- if (is_page('19') )
- {
- $cat = array(4);
- }
- else
- {
- $cat = '';
- }
- $showposts = 3; // -1 shows all posts
- $do_not_show_stickies = 1; // 0 to show stickies
- $args=array(
- 'category__in' => $cat,
- 'showposts' => $showposts,
- 'caller_get_posts' => $do_not_show_stickies,
- );
- $my_query = new WP_Query($args);
- ?>
- <?php
- //get_sidebar();
- ?>
- <script type="text/javascript">
- jQuery(document).ready(function($) {
- // $() will work as an alias for jQuery() inside of this function
- $('.intro').click(function() {
- $(this).animate({
- height : 'toggle',
- opacity: 'toggle'
- }, 500)
- .parent('.content').children('.whole').animate({
- height : 'toggle',
- opacity: 'toggle'
- }, 500);
- });
- $('.whole').click(function() {
- $(this).parent('.content').children('.whole').animate({
- height : 'toggle',
- opacity: 'toggle'
- }, 500)
- .parent('.content').children('.intro').animate({
- height : 'toggle',
- opacity: 'toggle'
- }, 500);
- });
- });
- </script>
- <div id="primary" class="hfeed" style="width: 720px;">
- <?php if( $my_query->have_posts() ) : ?>
- <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <?php
- //necessary to show the tags
- global $wp_query;
- $wp_query->in_the_loop = true;
- ?>
- <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
- <div class="post-thumbnail-div">
- <?php the_post_thumbnail('post-thumbnails'); ?>
- </div>
- <div class="post-entry-div" style="width: 600px;">
- <h3>
- <!-- THE TITLE -->
- <a class="title" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
- </h3>
- <div class="info">
- <span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span>
- <?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
- <?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?>
- <span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span>
- <div class="fixed"></div>
- </div>
- <div class="content">
- <?php //the_content(__('CONTINUE READING->', 'inove')); ?>
- <div class="intro"><?php echo content('50'); ?></div>
- <div class="whole"><?php the_content(); ?></div>
- <a href=<?php the_permalink() ?> >Read More</a>
- <div class="fixed"></div>
- </div>
- <div class="under">
- <span class="date">Posted at <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> </span>
- <span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span>
- <div class="fixed"></div>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <div id="pagenavi">
- <?php
- kriesi_pagination(6,6);
- ?>
- <div class="fixed"></div>
- </div>
- <?php else : ?>
- <div class="errorbox">
- <?php _e('Sorry, no posts matched your criteria.', 'inove'); ?>
- </div>
- <?php endif; ?>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement