Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( is_home() ) { ?>
- <?php $my_query = new WP_Query('posts_per_page=1');
- while ($my_query->have_posts()) : $my_query->the_post();
- $do_not_duplicate = $post->ID;?>
- <h1 class="post-title">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
- <?php the_title(); ?></a></h1>
- <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --> | Category: <?php the_category(', ') ?></small>
- <?php the_content(); ?>
- <div class="read-more"><a href="<?php echo get_permalink(); ?>">Permalink</a></div>
- <?php endwhile; ?>
- <?php if (have_posts()) : while (have_posts()) : the_post();
- if( $post->ID == $do_not_duplicate ) continue; ?>
- <h1 class="post-title">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
- <?php the_title(); ?></a></h1>
- <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --> | Category: <?php the_category(', ') ?></small>
- <?php the_excerpt(); ?>
- <div class="read-more"><a href="<?php echo get_permalink(); ?>">Read the Full Article</a></div>
- <?php endwhile; endif; ?>
- <?php } else { ?>
- <?php if (have_posts()) : while (have_posts()) : the_post();
- if( $post->ID == $do_not_duplicate ) continue; ?>
- <h1 class="post-title">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
- <?php the_title(); ?></a></h1>
- <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --> | Category: <?php the_category(', ') ?></small>
- <?php the_excerpt(); ?>
- <div class="read-more"><a href="<?php echo get_permalink(); ?>">Read the Full Article</a></div>
- <?php endwhile; endif; ?>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement